From ab7bb6bd7054ebe9208e353aed1bfbbd5841f0c8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 19 Apr 2023 08:42:15 +0000 Subject: [PATCH] CodeGen from PR 23599 in Azure/azure-rest-api-specs Merge 5349a6c267b37c18cd581d3ef3a582c1a728f76c into c655f508b77a442f106250c1ced44ee40e110b00 --- eng/versioning/version_client.txt | 1 + pom.xml | 1 + .../CHANGELOG.md | 5 + .../README.md | 105 + .../SAMPLE.md | 4142 +++++++++++++++++ .../pom.xml | 61 + .../PaloAltoNetworksNgfwManager.java | 497 ++ ...rtificateObjectGlobalRulestacksClient.java | 196 + ...ertificateObjectLocalRulestacksClient.java | 219 + .../fluent/FirewallStatusClient.java | 71 + .../fluent/FirewallsClient.java | 352 ++ .../FqdnListGlobalRulestacksClient.java | 187 + .../fluent/FqdnListLocalRulestacksClient.java | 214 + .../fluent/GlobalRulestacksClient.java | 478 ++ .../fluent/LocalRulesClient.java | 301 ++ .../fluent/LocalRulestacksClient.java | 588 +++ .../fluent/OperationsClient.java | 38 + .../fluent/PaloAltoNetworksCloudngfw.java | 144 + .../fluent/PostRulesClient.java | 270 ++ .../fluent/PreRulesClient.java | 270 ++ .../PrefixListGlobalRulestacksClient.java | 187 + .../PrefixListLocalRulestacksClient.java | 206 + .../AdvSecurityObjectListResponseInner.java | 88 + .../fluent/models/CertificateObject.java | 182 + ...ateObjectGlobalRulestackResourceInner.java | 197 + ...cateObjectLocalRulestackResourceInner.java | 197 + .../fluent/models/ChangelogInner.java | 112 + .../fluent/models/CountriesResponseInner.java | 88 + .../models/FirewallDeploymentProperties.java | 327 ++ .../fluent/models/FirewallResourceInner.java | 338 ++ .../fluent/models/FirewallStatusProperty.java | 106 + .../models/FirewallStatusResourceInner.java | 116 + .../FqdnListGlobalRulestackResourceInner.java | 170 + .../FqdnListLocalRulestackResourceInner.java | 170 + .../fluent/models/FqdnObject.java | 153 + .../models/GlobalRulestackInfoInner.java | 59 + .../models/GlobalRulestackResourceInner.java | 327 ++ .../fluent/models/ListAppIdResponseInner.java | 85 + .../models/ListFirewallsResponseInner.java | 86 + .../models/LocalRulesResourceInner.java | 509 ++ .../models/LocalRulestackResourceInner.java | 310 ++ .../fluent/models/LogSettingsInner.java | 225 + .../fluent/models/OperationInner.java | 127 + .../fluent/models/PostRulesResourceInner.java | 509 ++ .../fluent/models/PreRulesResourceInner.java | 509 ++ .../PredefinedUrlCategoriesResponseInner.java | 89 + ...refixListGlobalRulestackResourceInner.java | 170 + .../models/PrefixListResourceInner.java | 170 + .../fluent/models/PrefixObject.java | 153 + .../fluent/models/RuleCounterInner.java | 302 ++ .../fluent/models/RuleCounterResetInner.java | 143 + .../fluent/models/RuleEntry.java | 552 +++ .../fluent/models/RulestackProperties.java | 255 + .../models/SecurityServicesResponseInner.java | 88 + .../fluent/models/SupportInfoInner.java | 337 ++ .../fluent/models/package-info.java | 6 + .../paloaltonetworks/fluent/package-info.java | 6 + .../AdvSecurityObjectListResponseImpl.java | 38 + ...cateObjectGlobalRulestackResourceImpl.java | 72 + ...icateObjectGlobalRulestacksClientImpl.java | 968 ++++ ...CertificateObjectGlobalRulestacksImpl.java | 107 + ...icateObjectLocalRulestackResourceImpl.java | 189 + ...ficateObjectLocalRulestacksClientImpl.java | 1161 +++++ .../CertificateObjectLocalRulestacksImpl.java | 198 + .../implementation/ChangelogImpl.java | 49 + .../implementation/CountriesResponseImpl.java | 45 + .../implementation/FirewallResourceImpl.java | 344 ++ .../FirewallStatusClientImpl.java | 496 ++ .../implementation/FirewallStatusImpl.java | 75 + .../FirewallStatusResourceImpl.java | 70 + .../implementation/FirewallsClientImpl.java | 2083 +++++++++ .../implementation/FirewallsImpl.java | 258 + .../FqdnListGlobalRulestackResourceImpl.java | 74 + .../FqdnListGlobalRulestacksClientImpl.java | 937 ++++ .../FqdnListGlobalRulestacksImpl.java | 103 + .../FqdnListLocalRulestackResourceImpl.java | 185 + .../FqdnListLocalRulestacksClientImpl.java | 1149 +++++ .../FqdnListLocalRulestacksImpl.java | 197 + .../GlobalRulestackInfoImpl.java | 33 + .../GlobalRulestackResourceImpl.java | 102 + .../GlobalRulestacksClientImpl.java | 2308 +++++++++ .../implementation/GlobalRulestacksImpl.java | 326 ++ .../implementation/ListAppIdResponseImpl.java | 44 + .../ListFirewallsResponseImpl.java | 44 + .../implementation/LocalRulesClientImpl.java | 1675 +++++++ .../implementation/LocalRulesImpl.java | 264 ++ .../LocalRulesResourceImpl.java | 363 ++ .../LocalRulestackResourceImpl.java | 376 ++ .../LocalRulestacksClientImpl.java | 3313 +++++++++++++ .../implementation/LocalRulestacksImpl.java | 434 ++ .../implementation/LogSettingsImpl.java | 61 + .../implementation/OperationImpl.java | 52 + .../implementation/OperationsClientImpl.java | 276 ++ .../implementation/OperationsImpl.java | 46 + .../PaloAltoNetworksCloudngfwBuilder.java | 144 + .../PaloAltoNetworksCloudngfwImpl.java | 472 ++ .../implementation/PostRulesClientImpl.java | 1380 ++++++ .../implementation/PostRulesImpl.java | 161 + .../implementation/PostRulesResourceImpl.java | 152 + .../implementation/PreRulesClientImpl.java | 1375 ++++++ .../implementation/PreRulesImpl.java | 161 + .../implementation/PreRulesResourceImpl.java | 152 + .../PredefinedUrlCategoriesResponseImpl.java | 45 + ...PrefixListGlobalRulestackResourceImpl.java | 74 + .../PrefixListGlobalRulestacksClientImpl.java | 939 ++++ .../PrefixListGlobalRulestacksImpl.java | 103 + .../PrefixListLocalRulestacksClientImpl.java | 1125 +++++ .../PrefixListLocalRulestacksImpl.java | 196 + .../PrefixListResourceImpl.java | 182 + .../implementation/RuleCounterImpl.java | 71 + .../implementation/RuleCounterResetImpl.java | 49 + .../SecurityServicesResponseImpl.java | 38 + .../implementation/SupportInfoImpl.java | 78 + .../implementation/Utils.java | 204 + .../implementation/package-info.java | 6 + .../paloaltonetworks/models/ActionEnum.java | 53 + .../paloaltonetworks/models/ActionType.java | 44 + .../models/AdvSecurityObjectListResponse.java | 32 + .../models/AdvSecurityObjectModel.java | 87 + .../models/AdvSecurityObjectTypeEnum.java | 47 + .../paloaltonetworks/models/AppSeenData.java | 87 + .../paloaltonetworks/models/AppSeenInfo.java | 244 + .../models/ApplicationInsights.java | 76 + ...ourceManagerManagedIdentityProperties.java | 129 + ...reResourceManagerUserAssignedIdentity.java | 76 + .../paloaltonetworks/models/BillingCycle.java | 47 + .../paloaltonetworks/models/BooleanEnum.java | 47 + .../paloaltonetworks/models/Category.java | 89 + ...tificateObjectGlobalRulestackResource.java | 90 + ...jectGlobalRulestackResourceListResult.java | 91 + .../CertificateObjectGlobalRulestacks.java | 119 + ...rtificateObjectLocalRulestackResource.java | 308 ++ ...bjectLocalRulestackResourceListResult.java | 91 + .../CertificateObjectLocalRulestacks.java | 146 + .../paloaltonetworks/models/Changelog.java | 40 + .../models/CountriesResponse.java | 32 + .../paloaltonetworks/models/Country.java | 83 + .../models/DecryptionRuleTypeEnum.java | 50 + .../paloaltonetworks/models/DefaultMode.java | 50 + .../models/DestinationAddr.java | 155 + .../paloaltonetworks/models/DnsProxy.java | 47 + .../paloaltonetworks/models/DnsSettings.java | 106 + .../paloaltonetworks/models/EgressNat.java | 47 + .../models/EnabledDnsType.java | 47 + .../models/EndpointConfiguration.java | 91 + .../paloaltonetworks/models/EventHub.java | 154 + .../models/FirewallResource.java | 500 ++ .../models/FirewallResourceListResult.java | 89 + .../models/FirewallResourceUpdate.java | 111 + .../FirewallResourceUpdateProperties.java | 280 ++ .../models/FirewallStatus.java | 63 + .../models/FirewallStatusResource.java | 81 + .../FirewallStatusResourceListResult.java | 89 + .../paloaltonetworks/models/Firewalls.java | 261 ++ .../FqdnListGlobalRulestackResource.java | 83 + ...ListGlobalRulestackResourceListResult.java | 89 + .../models/FqdnListGlobalRulestacks.java | 115 + .../FqdnListLocalRulestackResource.java | 262 ++ ...nListLocalRulestackResourceListResult.java | 89 + .../models/FqdnListLocalRulestacks.java | 146 + .../models/FrontendSetting.java | 157 + .../models/GlobalRulestackInfo.java | 24 + .../models/GlobalRulestackResource.java | 124 + .../GlobalRulestackResourceListResult.java | 89 + .../models/GlobalRulestackResourceUpdate.java | 108 + ...obalRulestackResourceUpdateProperties.java | 236 + .../models/GlobalRulestacks.java | 357 ++ .../paloaltonetworks/models/HealthStatus.java | 53 + .../paloaltonetworks/models/IpAddress.java | 76 + .../models/IpAddressSpace.java | 76 + .../models/ListAppIdResponse.java | 32 + .../models/ListFirewallsResponse.java | 32 + .../paloaltonetworks/models/LocalRules.java | 229 + .../models/LocalRulesResource.java | 739 +++ .../models/LocalRulesResourceListResult.java | 89 + .../models/LocalRulestackResource.java | 568 +++ .../LocalRulestackResourceListResult.java | 89 + .../models/LocalRulestackResourceUpdate.java | 111 + ...ocalRulestackResourceUpdateProperties.java | 236 + .../models/LocalRulestacks.java | 445 ++ .../models/LogDestination.java | 111 + .../paloaltonetworks/models/LogOption.java | 47 + .../paloaltonetworks/models/LogSettings.java | 66 + .../paloaltonetworks/models/LogType.java | 59 + .../models/ManagedIdentityType.java | 53 + .../models/MarketplaceDetails.java | 131 + .../models/MarketplaceSubscriptionStatus.java | 59 + .../paloaltonetworks/models/MonitorLog.java | 154 + .../models/NameDescriptionObject.java | 84 + .../models/NetworkProfile.java | 210 + .../paloaltonetworks/models/NetworkType.java | 47 + .../paloaltonetworks/models/Operation.java | 56 + .../models/OperationDisplay.java | 91 + .../models/OperationListResult.java | 62 + .../paloaltonetworks/models/Operations.java | 33 + .../paloaltonetworks/models/Origin.java | 53 + .../models/PanoramaConfig.java | 166 + .../models/PanoramaStatus.java | 54 + .../paloaltonetworks/models/PlanData.java | 131 + .../paloaltonetworks/models/PostRules.java | 192 + .../models/PostRulesResource.java | 187 + .../models/PostRulesResourceListResult.java | 89 + .../paloaltonetworks/models/PreRules.java | 192 + .../models/PreRulesResource.java | 187 + .../models/PreRulesResourceListResult.java | 89 + .../PredefinedUrlCategoriesResponse.java | 33 + .../models/PredefinedUrlCategory.java | 89 + .../PrefixListGlobalRulestackResource.java | 83 + ...ListGlobalRulestackResourceListResult.java | 89 + .../models/PrefixListGlobalRulestacks.java | 116 + .../models/PrefixListLocalRulestacks.java | 143 + .../models/PrefixListResource.java | 261 ++ .../models/PrefixListResourceListResult.java | 89 + .../paloaltonetworks/models/ProtocolType.java | 47 + .../models/ProvisioningState.java | 68 + .../models/ReadOnlyProvisioningState.java | 50 + .../paloaltonetworks/models/RuleCounter.java | 88 + .../models/RuleCounterReset.java | 52 + .../models/RulestackDetails.java | 102 + .../paloaltonetworks/models/ScopeType.java | 47 + .../models/SecurityServices.java | 232 + .../models/SecurityServicesResponse.java | 31 + .../models/SecurityServicesTypeEnum.java | 59 + .../models/SecurityServicesTypeList.java | 87 + .../paloaltonetworks/models/ServerStatus.java | 47 + .../paloaltonetworks/models/SourceAddr.java | 129 + .../paloaltonetworks/models/StateEnum.java | 47 + .../models/StorageAccount.java | 102 + .../paloaltonetworks/models/SupportInfo.java | 101 + .../paloaltonetworks/models/TagInfo.java | 87 + .../paloaltonetworks/models/UsageType.java | 47 + .../models/VnetConfiguration.java | 155 + .../models/VwanConfiguration.java | 173 + .../paloaltonetworks/models/package-info.java | 6 + .../paloaltonetworks/package-info.java | 6 + .../src/main/java/module-info.java | 19 + ...tGlobalRulestackCreateOrUpdateSamples.java | 54 + ...ateObjectGlobalRulestackDeleteSamples.java | 34 + ...ficateObjectGlobalRulestackGetSamples.java | 38 + ...icateObjectGlobalRulestackListSamples.java | 34 + ...ctLocalRulestackCreateOrUpdateSamples.java | 50 + ...cateObjectLocalRulestackDeleteSamples.java | 38 + ...ificateObjectLocalRulestackGetSamples.java | 38 + ...RulestackListByLocalRulestacksSamples.java | 38 + .../generated/FirewallStatusGetSamples.java | 34 + .../FirewallStatusListByFirewallsSamples.java | 34 + .../FirewallsCreateOrUpdateSamples.java | 219 + .../generated/FirewallsDeleteSamples.java | 34 + .../FirewallsGetByResourceGroupSamples.java | 38 + .../FirewallsGetGlobalRulestackSamples.java | 38 + .../FirewallsGetLogProfileSamples.java | 34 + .../FirewallsGetSupportInfoSamples.java | 38 + .../FirewallsListByResourceGroupSamples.java | 34 + .../generated/FirewallsListSamples.java | 34 + .../FirewallsSaveLogProfileSamples.java | 139 + .../generated/FirewallsUpdateSamples.java | 214 + ...tGlobalRulestackCreateOrUpdateSamples.java | 53 + .../FqdnListGlobalRulestackDeleteSamples.java | 34 + .../FqdnListGlobalRulestackGetSamples.java | 34 + .../FqdnListGlobalRulestackListSamples.java | 34 + ...stLocalRulestackCreateOrUpdateSamples.java | 49 + .../FqdnListLocalRulestackDeleteSamples.java | 34 + .../FqdnListLocalRulestackGetSamples.java | 38 + ...RulestackListByLocalRulestacksSamples.java | 34 + .../GlobalRulestackCommitSamples.java | 34 + .../GlobalRulestackCreateOrUpdateSamples.java | 91 + .../GlobalRulestackDeleteSamples.java | 34 + .../GlobalRulestackGetChangeLogSamples.java | 34 + .../generated/GlobalRulestackGetSamples.java | 34 + ...ackListAdvancedSecurityObjectsSamples.java | 50 + .../GlobalRulestackListAppIdsSamples.java | 38 + .../GlobalRulestackListCountriesSamples.java | 34 + .../GlobalRulestackListFirewallsSamples.java | 34 + ...ackListPredefinedUrlCategoriesSamples.java | 38 + .../generated/GlobalRulestackListSamples.java | 34 + ...lRulestackListSecurityServicesSamples.java | 50 + .../GlobalRulestackRevertSamples.java | 34 + .../GlobalRulestackUpdateSamples.java | 93 + .../LocalRulesCreateOrUpdateSamples.java | 83 + .../generated/LocalRulesDeleteSamples.java | 34 + .../LocalRulesGetCountersSamples.java | 38 + .../generated/LocalRulesGetSamples.java | 34 + ...ocalRulesListByLocalRulestacksSamples.java | 34 + .../LocalRulesRefreshCountersSamples.java | 38 + .../LocalRulesResetCountersSamples.java | 38 + .../LocalRulestacksCommitSamples.java | 34 + .../LocalRulestacksCreateOrUpdateSamples.java | 87 + .../LocalRulestacksDeleteSamples.java | 34 + ...alRulestacksGetByResourceGroupSamples.java | 34 + .../LocalRulestacksGetChangeLogSamples.java | 34 + .../LocalRulestacksGetSupportInfoSamples.java | 38 + ...cksListAdvancedSecurityObjectsSamples.java | 52 + .../LocalRulestacksListAppIdsSamples.java | 39 + ...lRulestacksListByResourceGroupSamples.java | 34 + .../LocalRulestacksListCountriesSamples.java | 38 + .../LocalRulestacksListFirewallsSamples.java | 34 + ...cksListPredefinedUrlCategoriesSamples.java | 39 + .../generated/LocalRulestacksListSamples.java | 34 + ...RulestacksListSecurityServicesSamples.java | 52 + .../LocalRulestacksRevertSamples.java | 34 + .../LocalRulestacksUpdateSamples.java | 98 + .../generated/OperationsListSamples.java | 34 + .../PostRulesCreateOrUpdateSamples.java | 86 + .../generated/PostRulesDeleteSamples.java | 34 + .../PostRulesGetCountersSamples.java | 34 + .../generated/PostRulesGetSamples.java | 34 + .../generated/PostRulesListSamples.java | 34 + .../PostRulesRefreshCountersSamples.java | 34 + .../PostRulesResetCountersSamples.java | 34 + .../PreRulesCreateOrUpdateSamples.java | 86 + .../generated/PreRulesDeleteSamples.java | 34 + .../generated/PreRulesGetCountersSamples.java | 34 + .../generated/PreRulesGetSamples.java | 34 + .../generated/PreRulesListSamples.java | 34 + .../PreRulesRefreshCountersSamples.java | 34 + .../PreRulesResetCountersSamples.java | 34 + ...tGlobalRulestackCreateOrUpdateSamples.java | 53 + ...refixListGlobalRulestackDeleteSamples.java | 34 + .../PrefixListGlobalRulestackGetSamples.java | 34 + .../PrefixListGlobalRulestackListSamples.java | 34 + ...stLocalRulestackCreateOrUpdateSamples.java | 49 + ...PrefixListLocalRulestackDeleteSamples.java | 34 + .../PrefixListLocalRulestackGetSamples.java | 38 + ...RulestackListByLocalRulestacksSamples.java | 38 + sdk/paloaltonetworks/ci.yml | 47 + sdk/paloaltonetworks/pom.xml | 15 + 326 files changed, 59797 insertions(+) create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/CHANGELOG.md create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/README.md create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/SAMPLE.md create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/pom.xml create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/PaloAltoNetworksNgfwManager.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/CertificateObjectGlobalRulestacksClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/CertificateObjectLocalRulestacksClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FirewallStatusClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FirewallsClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FqdnListGlobalRulestacksClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FqdnListLocalRulestacksClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/GlobalRulestacksClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/LocalRulesClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/LocalRulestacksClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/OperationsClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PaloAltoNetworksCloudngfw.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PostRulesClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PreRulesClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PrefixListGlobalRulestacksClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PrefixListLocalRulestacksClient.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/AdvSecurityObjectListResponseInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CertificateObject.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CertificateObjectGlobalRulestackResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CertificateObjectLocalRulestackResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/ChangelogInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CountriesResponseInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallDeploymentProperties.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallStatusProperty.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallStatusResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FqdnListGlobalRulestackResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FqdnListLocalRulestackResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FqdnObject.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/GlobalRulestackInfoInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/GlobalRulestackResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/ListAppIdResponseInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/ListFirewallsResponseInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/LocalRulesResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/LocalRulestackResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/LogSettingsInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/OperationInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PostRulesResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PreRulesResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PredefinedUrlCategoriesResponseInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PrefixListGlobalRulestackResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PrefixListResourceInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PrefixObject.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RuleCounterInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RuleCounterResetInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RuleEntry.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RulestackProperties.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/SecurityServicesResponseInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/SupportInfoInner.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/package-info.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/package-info.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/AdvSecurityObjectListResponseImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectGlobalRulestackResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectGlobalRulestacksClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectGlobalRulestacksImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectLocalRulestackResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectLocalRulestacksClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectLocalRulestacksImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/ChangelogImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CountriesResponseImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallStatusClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallStatusImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallStatusResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallsClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallsImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListGlobalRulestackResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListGlobalRulestacksClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListGlobalRulestacksImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListLocalRulestackResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListLocalRulestacksClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListLocalRulestacksImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestackInfoImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestackResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestacksClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestacksImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/ListAppIdResponseImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/ListFirewallsResponseImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulesClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulesImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulesResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulestackResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulestacksClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulestacksImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LogSettingsImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/OperationImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/OperationsClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/OperationsImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PaloAltoNetworksCloudngfwBuilder.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PaloAltoNetworksCloudngfwImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PostRulesClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PostRulesImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PostRulesResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PreRulesClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PreRulesImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PreRulesResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PredefinedUrlCategoriesResponseImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListGlobalRulestackResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListGlobalRulestacksClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListGlobalRulestacksImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListLocalRulestacksClientImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListLocalRulestacksImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListResourceImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/RuleCounterImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/RuleCounterResetImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/SecurityServicesResponseImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/SupportInfoImpl.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/Utils.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/package-info.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ActionEnum.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ActionType.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AdvSecurityObjectListResponse.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AdvSecurityObjectModel.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AdvSecurityObjectTypeEnum.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AppSeenData.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AppSeenInfo.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ApplicationInsights.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AzureResourceManagerManagedIdentityProperties.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AzureResourceManagerUserAssignedIdentity.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/BillingCycle.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/BooleanEnum.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Category.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectGlobalRulestackResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectGlobalRulestackResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectGlobalRulestacks.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectLocalRulestackResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectLocalRulestackResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectLocalRulestacks.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Changelog.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CountriesResponse.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Country.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DecryptionRuleTypeEnum.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DefaultMode.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DestinationAddr.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DnsProxy.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DnsSettings.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EgressNat.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EnabledDnsType.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EndpointConfiguration.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EventHub.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResourceUpdate.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResourceUpdateProperties.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallStatus.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallStatusResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallStatusResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Firewalls.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListGlobalRulestackResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListGlobalRulestackResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListGlobalRulestacks.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListLocalRulestackResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListLocalRulestackResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListLocalRulestacks.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FrontendSetting.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackInfo.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResourceUpdate.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResourceUpdateProperties.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestacks.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/HealthStatus.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/IpAddress.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/IpAddressSpace.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ListAppIdResponse.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ListFirewallsResponse.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRules.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulesResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulesResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResourceUpdate.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResourceUpdateProperties.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestacks.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogDestination.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogOption.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogSettings.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogType.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ManagedIdentityType.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/MarketplaceDetails.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/MarketplaceSubscriptionStatus.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/MonitorLog.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/NameDescriptionObject.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/NetworkProfile.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/NetworkType.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Operation.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/OperationDisplay.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/OperationListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Operations.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Origin.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PanoramaConfig.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PanoramaStatus.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PlanData.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PostRules.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PostRulesResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PostRulesResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PreRules.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PreRulesResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PreRulesResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PredefinedUrlCategoriesResponse.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PredefinedUrlCategory.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListGlobalRulestackResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListGlobalRulestackResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListGlobalRulestacks.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListLocalRulestacks.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListResource.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListResourceListResult.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ProtocolType.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ProvisioningState.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ReadOnlyProvisioningState.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/RuleCounter.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/RuleCounterReset.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/RulestackDetails.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ScopeType.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServices.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServicesResponse.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServicesTypeEnum.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServicesTypeList.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ServerStatus.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SourceAddr.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/StateEnum.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/StorageAccount.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SupportInfo.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/TagInfo.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/UsageType.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/VnetConfiguration.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/VwanConfiguration.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/package-info.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/package-info.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/module-info.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackCreateOrUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackDeleteSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackGetSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackListSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackCreateOrUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackDeleteSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackGetSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackListByLocalRulestacksSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallStatusGetSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallStatusListByFirewallsSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsCreateOrUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsDeleteSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetByResourceGroupSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetGlobalRulestackSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetLogProfileSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetSupportInfoSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsListByResourceGroupSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsListSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsSaveLogProfileSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackCreateOrUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackDeleteSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackGetSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackListSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackCreateOrUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackDeleteSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackGetSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackListByLocalRulestacksSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackCommitSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackCreateOrUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackDeleteSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackGetChangeLogSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackGetSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListAdvancedSecurityObjectsSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListAppIdsSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListCountriesSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListFirewallsSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListPredefinedUrlCategoriesSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListSecurityServicesSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackRevertSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesCreateOrUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesDeleteSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesGetCountersSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesGetSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesListByLocalRulestacksSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesRefreshCountersSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesResetCountersSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksCommitSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksCreateOrUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksDeleteSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksGetByResourceGroupSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksGetChangeLogSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksGetSupportInfoSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListAdvancedSecurityObjectsSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListAppIdsSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListByResourceGroupSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListCountriesSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListFirewallsSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListPredefinedUrlCategoriesSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListSecurityServicesSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksRevertSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/OperationsListSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesCreateOrUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesDeleteSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesGetCountersSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesGetSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesListSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesRefreshCountersSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesResetCountersSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesCreateOrUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesDeleteSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesGetCountersSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesGetSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesListSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesRefreshCountersSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesResetCountersSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackCreateOrUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackDeleteSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackGetSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackListSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackCreateOrUpdateSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackDeleteSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackGetSamples.java create mode 100644 sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackListByLocalRulestacksSamples.java create mode 100644 sdk/paloaltonetworks/ci.yml create mode 100644 sdk/paloaltonetworks/pom.xml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 9899251a39af..6f02c251f323 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -407,6 +407,7 @@ com.azure.resourcemanager:azure-resourcemanager-voiceservices;1.0.0-beta.1;1.0.0 com.azure.resourcemanager:azure-resourcemanager-graphservices;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-qumulo;1.0.0-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-paloaltonetworks;1.0.0-beta.1;1.0.0-beta.1 com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1 com.azure.tools:azure-sdk-build-tool;1.0.0-beta.1;1.0.0-beta.2 diff --git a/pom.xml b/pom.xml index cb9ffab68ca1..f893e1394407 100644 --- a/pom.xml +++ b/pom.xml @@ -128,6 +128,7 @@ sdk/oep sdk/operationsmanagement sdk/orbital + sdk/paloaltonetworks sdk/parents sdk/peering sdk/personalizer diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/CHANGELOG.md b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/CHANGELOG.md new file mode 100644 index 000000000000..f2ec41c2ae82 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2023-04-19) + +- Azure Resource Manager PaloAlto Networks Ngfw client library for Java. This package contains Microsoft Azure SDK for PaloAlto Networks Ngfw Management SDK. Package tag package-2022-08-29-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/README.md b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/README.md new file mode 100644 index 000000000000..304cc2b9994b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/README.md @@ -0,0 +1,105 @@ +# Azure Resource Manager PaloAlto Networks Ngfw client library for Java + +Azure Resource Manager PaloAlto Networks Ngfw client library for Java. + +This package contains Microsoft Azure SDK for PaloAlto Networks Ngfw Management SDK. Package tag package-2022-08-29-preview. 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 + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-paloaltonetworks;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-paloaltonetworks + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. + +### Authentication + +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. + +- `AZURE_CLIENT_ID` for Azure client ID. +- `AZURE_TENANT_ID` for Azure tenant ID. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. + +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. + +With above configuration, `azure` client can be authenticated using the following code: + +```java +AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +PaloAltoNetworksNgfwManager manager = PaloAltoNetworksNgfwManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide][cg]. + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[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/paloaltonetworks/azure-resourcemanager-paloaltonetworks/SAMPLE.md b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/SAMPLE.md new file mode 100644 index 000000000000..ce422645970b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/SAMPLE.md @@ -0,0 +1,4142 @@ +# Code snippets and samples + + +## CertificateObjectGlobalRulestack + +- [CreateOrUpdate](#certificateobjectglobalrulestack_createorupdate) +- [Delete](#certificateobjectglobalrulestack_delete) +- [Get](#certificateobjectglobalrulestack_get) +- [List](#certificateobjectglobalrulestack_list) + +## CertificateObjectLocalRulestack + +- [CreateOrUpdate](#certificateobjectlocalrulestack_createorupdate) +- [Delete](#certificateobjectlocalrulestack_delete) +- [Get](#certificateobjectlocalrulestack_get) +- [ListByLocalRulestacks](#certificateobjectlocalrulestack_listbylocalrulestacks) + +## FirewallStatus + +- [Get](#firewallstatus_get) +- [ListByFirewalls](#firewallstatus_listbyfirewalls) + +## Firewalls + +- [CreateOrUpdate](#firewalls_createorupdate) +- [Delete](#firewalls_delete) +- [GetByResourceGroup](#firewalls_getbyresourcegroup) +- [GetGlobalRulestack](#firewalls_getglobalrulestack) +- [GetLogProfile](#firewalls_getlogprofile) +- [GetSupportInfo](#firewalls_getsupportinfo) +- [List](#firewalls_list) +- [ListByResourceGroup](#firewalls_listbyresourcegroup) +- [SaveLogProfile](#firewalls_savelogprofile) +- [Update](#firewalls_update) + +## FqdnListGlobalRulestack + +- [CreateOrUpdate](#fqdnlistglobalrulestack_createorupdate) +- [Delete](#fqdnlistglobalrulestack_delete) +- [Get](#fqdnlistglobalrulestack_get) +- [List](#fqdnlistglobalrulestack_list) + +## FqdnListLocalRulestack + +- [CreateOrUpdate](#fqdnlistlocalrulestack_createorupdate) +- [Delete](#fqdnlistlocalrulestack_delete) +- [Get](#fqdnlistlocalrulestack_get) +- [ListByLocalRulestacks](#fqdnlistlocalrulestack_listbylocalrulestacks) + +## GlobalRulestack + +- [Commit](#globalrulestack_commit) +- [CreateOrUpdate](#globalrulestack_createorupdate) +- [Delete](#globalrulestack_delete) +- [Get](#globalrulestack_get) +- [GetChangeLog](#globalrulestack_getchangelog) +- [List](#globalrulestack_list) +- [ListAdvancedSecurityObjects](#globalrulestack_listadvancedsecurityobjects) +- [ListAppIds](#globalrulestack_listappids) +- [ListCountries](#globalrulestack_listcountries) +- [ListFirewalls](#globalrulestack_listfirewalls) +- [ListPredefinedUrlCategories](#globalrulestack_listpredefinedurlcategories) +- [ListSecurityServices](#globalrulestack_listsecurityservices) +- [Revert](#globalrulestack_revert) +- [Update](#globalrulestack_update) + +## LocalRules + +- [CreateOrUpdate](#localrules_createorupdate) +- [Delete](#localrules_delete) +- [Get](#localrules_get) +- [GetCounters](#localrules_getcounters) +- [ListByLocalRulestacks](#localrules_listbylocalrulestacks) +- [RefreshCounters](#localrules_refreshcounters) +- [ResetCounters](#localrules_resetcounters) + +## LocalRulestacks + +- [Commit](#localrulestacks_commit) +- [CreateOrUpdate](#localrulestacks_createorupdate) +- [Delete](#localrulestacks_delete) +- [GetByResourceGroup](#localrulestacks_getbyresourcegroup) +- [GetChangeLog](#localrulestacks_getchangelog) +- [GetSupportInfo](#localrulestacks_getsupportinfo) +- [List](#localrulestacks_list) +- [ListAdvancedSecurityObjects](#localrulestacks_listadvancedsecurityobjects) +- [ListAppIds](#localrulestacks_listappids) +- [ListByResourceGroup](#localrulestacks_listbyresourcegroup) +- [ListCountries](#localrulestacks_listcountries) +- [ListFirewalls](#localrulestacks_listfirewalls) +- [ListPredefinedUrlCategories](#localrulestacks_listpredefinedurlcategories) +- [ListSecurityServices](#localrulestacks_listsecurityservices) +- [Revert](#localrulestacks_revert) +- [Update](#localrulestacks_update) + +## Operations + +- [List](#operations_list) + +## PostRules + +- [CreateOrUpdate](#postrules_createorupdate) +- [Delete](#postrules_delete) +- [Get](#postrules_get) +- [GetCounters](#postrules_getcounters) +- [List](#postrules_list) +- [RefreshCounters](#postrules_refreshcounters) +- [ResetCounters](#postrules_resetcounters) + +## PreRules + +- [CreateOrUpdate](#prerules_createorupdate) +- [Delete](#prerules_delete) +- [Get](#prerules_get) +- [GetCounters](#prerules_getcounters) +- [List](#prerules_list) +- [RefreshCounters](#prerules_refreshcounters) +- [ResetCounters](#prerules_resetcounters) + +## PrefixListGlobalRulestack + +- [CreateOrUpdate](#prefixlistglobalrulestack_createorupdate) +- [Delete](#prefixlistglobalrulestack_delete) +- [Get](#prefixlistglobalrulestack_get) +- [List](#prefixlistglobalrulestack_list) + +## PrefixListLocalRulestack + +- [CreateOrUpdate](#prefixlistlocalrulestack_createorupdate) +- [Delete](#prefixlistlocalrulestack_delete) +- [Get](#prefixlistlocalrulestack_get) +- [ListByLocalRulestacks](#prefixlistlocalrulestack_listbylocalrulestacks) +### CertificateObjectGlobalRulestack_CreateOrUpdate + +```java +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectGlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; + +/** Samples for CertificateObjectGlobalRulestack CreateOrUpdate. */ +public final class CertificateObjectGlobalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectGlobalRulestacks() + .createOrUpdate( + "praval", + "armid1", + new CertificateObjectGlobalRulestackResourceInner().withCertificateSelfSigned(BooleanEnum.TRUE), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectGlobalRulestacks() + .createOrUpdate( + "praval", + "armid1", + new CertificateObjectGlobalRulestackResourceInner() + .withCertificateSignerResourceId("") + .withCertificateSelfSigned(BooleanEnum.TRUE) + .withAuditComment("comment") + .withDescription("description") + .withEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), + com.azure.core.util.Context.NONE); + } +} +``` + +### CertificateObjectGlobalRulestack_Delete + +```java +/** Samples for CertificateObjectGlobalRulestack Delete. */ +public final class CertificateObjectGlobalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.certificateObjectGlobalRulestacks().delete("praval", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.certificateObjectGlobalRulestacks().delete("praval", "armid1", com.azure.core.util.Context.NONE); + } +} +``` + +### CertificateObjectGlobalRulestack_Get + +```java +/** Samples for CertificateObjectGlobalRulestack Get. */ +public final class CertificateObjectGlobalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectGlobalRulestacks() + .getWithResponse("praval", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectGlobalRulestacks() + .getWithResponse("praval", "armid1", com.azure.core.util.Context.NONE); + } +} +``` + +### CertificateObjectGlobalRulestack_List + +```java +/** Samples for CertificateObjectGlobalRulestack List. */ +public final class CertificateObjectGlobalRulestackListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_List_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.certificateObjectGlobalRulestacks().list("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_List_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.certificateObjectGlobalRulestacks().list("praval", com.azure.core.util.Context.NONE); + } +} +``` + +### CertificateObjectLocalRulestack_CreateOrUpdate + +```java +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; + +/** Samples for CertificateObjectLocalRulestack CreateOrUpdate. */ +public final class CertificateObjectLocalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .define("armid1") + .withExistingLocalRulestack("rgopenapi", "lrs1") + .withCertificateSelfSigned(BooleanEnum.TRUE) + .create(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .define("armid1") + .withExistingLocalRulestack("rgopenapi", "lrs1") + .withCertificateSelfSigned(BooleanEnum.TRUE) + .withCertificateSignerResourceId("") + .withAuditComment("comment") + .withDescription("description") + .withEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c27") + .create(); + } +} +``` + +### CertificateObjectLocalRulestack_Delete + +```java +/** Samples for CertificateObjectLocalRulestack Delete. */ +public final class CertificateObjectLocalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .delete("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .delete("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } +} +``` + +### CertificateObjectLocalRulestack_Get + +```java +/** Samples for CertificateObjectLocalRulestack Get. */ +public final class CertificateObjectLocalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .getWithResponse("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .getWithResponse("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } +} +``` + +### CertificateObjectLocalRulestack_ListByLocalRulestacks + +```java +/** Samples for CertificateObjectLocalRulestack ListByLocalRulestacks. */ +public final class CertificateObjectLocalRulestackListByLocalRulestacksSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackListByLocalRulestacksMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .listByLocalRulestacks("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackListByLocalRulestacksMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .listByLocalRulestacks("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} +``` + +### FirewallStatus_Get + +```java +/** Samples for FirewallStatus Get. */ +public final class FirewallStatusGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FirewallStatus_Get_MinimumSet_Gen.json + */ + /** + * Sample code: FirewallStatus_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallStatusGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewallStatus().getWithResponse("rgopenapi", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FirewallStatus_Get_MaximumSet_Gen.json + */ + /** + * Sample code: FirewallStatus_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallStatusGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewallStatus().getWithResponse("rgopenapi", "firewall1", com.azure.core.util.Context.NONE); + } +} +``` + +### FirewallStatus_ListByFirewalls + +```java +/** Samples for FirewallStatus ListByFirewalls. */ +public final class FirewallStatusListByFirewallsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FirewallStatus_ListByFirewalls_MaximumSet_Gen.json + */ + /** + * Sample code: FirewallStatus_ListByFirewalls_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallStatusListByFirewallsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewallStatus().listByFirewalls("rgopenapi", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FirewallStatus_ListByFirewalls_MinimumSet_Gen.json + */ + /** + * Sample code: FirewallStatus_ListByFirewalls_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallStatusListByFirewallsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewallStatus().listByFirewalls("rgopenapi", "firewall1", com.azure.core.util.Context.NONE); + } +} +``` + +### Firewalls_CreateOrUpdate + +```java +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerUserAssignedIdentity; +import com.azure.resourcemanager.paloaltonetworks.models.BillingCycle; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DnsProxy; +import com.azure.resourcemanager.paloaltonetworks.models.DnsSettings; +import com.azure.resourcemanager.paloaltonetworks.models.EgressNat; +import com.azure.resourcemanager.paloaltonetworks.models.EnabledDnsType; +import com.azure.resourcemanager.paloaltonetworks.models.EndpointConfiguration; +import com.azure.resourcemanager.paloaltonetworks.models.FrontendSetting; +import com.azure.resourcemanager.paloaltonetworks.models.IpAddress; +import com.azure.resourcemanager.paloaltonetworks.models.IpAddressSpace; +import com.azure.resourcemanager.paloaltonetworks.models.ManagedIdentityType; +import com.azure.resourcemanager.paloaltonetworks.models.MarketplaceDetails; +import com.azure.resourcemanager.paloaltonetworks.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.paloaltonetworks.models.NetworkProfile; +import com.azure.resourcemanager.paloaltonetworks.models.NetworkType; +import com.azure.resourcemanager.paloaltonetworks.models.PanoramaConfig; +import com.azure.resourcemanager.paloaltonetworks.models.PlanData; +import com.azure.resourcemanager.paloaltonetworks.models.ProtocolType; +import com.azure.resourcemanager.paloaltonetworks.models.RulestackDetails; +import com.azure.resourcemanager.paloaltonetworks.models.UsageType; +import com.azure.resourcemanager.paloaltonetworks.models.VnetConfiguration; +import com.azure.resourcemanager.paloaltonetworks.models.VwanConfiguration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Firewalls CreateOrUpdate. */ +public final class FirewallsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .define("firewall1") + .withRegion("eastus") + .withExistingResourceGroup("firewall-rg") + .withNetworkProfile( + new NetworkProfile() + .withVnetConfiguration( + new VnetConfiguration() + .withVnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet") + .withAddressSpace("10.1.0.0/16")) + .withTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withUnTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withIpOfTrustSubnetForUdr( + new IpAddress() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddress("10.1.1.0/24"))) + .withVwanConfiguration( + new VwanConfiguration() + .withNetworkVirtualApplianceId("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withVHub( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withUnTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withIpOfTrustSubnetForUdr( + new IpAddress() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddress("10.1.1.0/24"))) + .withNetworkType(NetworkType.VNET) + .withPublicIps( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1") + .withAddress("20.22.92.11"))) + .withEnableEgressNat(EgressNat.ENABLED) + .withEgressNatIp( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1") + .withAddress("20.22.92.111")))) + .withDnsSettings( + new DnsSettings() + .withEnableDnsProxy(DnsProxy.DISABLED) + .withEnabledDnsType(EnabledDnsType.CUSTOM) + .withDnsServers( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1") + .withAddress("20.22.92.111")))) + .withPlanData( + new PlanData() + .withUsageType(UsageType.PAYG) + .withBillingCycle(BillingCycle.MONTHLY) + .withPlanId("liftrpantestplan")) + .withMarketplaceDetails( + new MarketplaceDetails() + .withOfferId("liftr-pan-ame-test") + .withPublisherId("isvtestuklegacy") + .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START)) + .withTags(mapOf("tagName", "value")) + .withIdentity( + new AzureResourceManagerManagedIdentityProperties() + .withType(ManagedIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "key16", + new AzureResourceManagerUserAssignedIdentity() + .withClientId("aaaa") + .withPrincipalId("aaaaaaaaaaaaaaa")))) + .withPanEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withIsPanoramaManaged(BooleanEnum.TRUE) + .withPanoramaConfig(new PanoramaConfig().withConfigString("bas64EncodedString")) + .withAssociatedRulestack( + new RulestackDetails().withResourceId("lrs1").withRulestackId("PANRSID").withLocation("eastus")) + .withFrontEndSettings( + Arrays + .asList( + new FrontendSetting() + .withName("frontendsetting11") + .withProtocol(ProtocolType.TCP) + .withFrontendConfiguration( + new EndpointConfiguration() + .withPort("80") + .withAddress( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp1") + .withAddress("20.22.91.251"))) + .withBackendConfiguration( + new EndpointConfiguration() + .withPort("80") + .withAddress( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp2") + .withAddress("20.22.32.136"))))) + .create(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .define("firewall1") + .withRegion("eastus") + .withExistingResourceGroup("firewall-rg") + .withNetworkProfile( + new NetworkProfile() + .withNetworkType(NetworkType.VNET) + .withPublicIps( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1") + .withAddress("20.22.92.11"))) + .withEnableEgressNat(EgressNat.ENABLED)) + .withDnsSettings(new DnsSettings()) + .withPlanData(new PlanData().withBillingCycle(BillingCycle.MONTHLY).withPlanId("liftrpantestplan")) + .withMarketplaceDetails( + new MarketplaceDetails().withOfferId("liftr-pan-ame-test").withPublisherId("isvtestuklegacy")) + .create(); + } + + @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; + } +} +``` + +### Firewalls_Delete + +```java +/** Samples for Firewalls Delete. */ +public final class FirewallsDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().delete("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().delete("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } +} +``` + +### Firewalls_GetByResourceGroup + +```java +/** Samples for Firewalls GetByResourceGroup. */ +public final class FirewallsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .getByResourceGroupWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .getByResourceGroupWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } +} +``` + +### Firewalls_GetGlobalRulestack + +```java +/** Samples for Firewalls GetGlobalRulestack. */ +public final class FirewallsGetGlobalRulestackSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getGlobalRulestack_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_getGlobalRulestack_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetGlobalRulestackMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .getGlobalRulestackWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getGlobalRulestack_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_getGlobalRulestack_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetGlobalRulestackMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .getGlobalRulestackWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } +} +``` + +### Firewalls_GetLogProfile + +```java +/** Samples for Firewalls GetLogProfile. */ +public final class FirewallsGetLogProfileSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getLogProfile_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_getLogProfile_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetLogProfileMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().getLogProfileWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getLogProfile_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_getLogProfile_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetLogProfileMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().getLogProfileWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } +} +``` + +### Firewalls_GetSupportInfo + +```java +/** Samples for Firewalls GetSupportInfo. */ +public final class FirewallsGetSupportInfoSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getSupportInfo_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_getSupportInfo_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetSupportInfoMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .getSupportInfoWithResponse("rgopenapi", "firewall1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getSupportInfo_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_getSupportInfo_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetSupportInfoMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .getSupportInfoWithResponse("rgopenapi", "firewall1", "user1@domain.com", com.azure.core.util.Context.NONE); + } +} +``` + +### Firewalls_List + +```java +/** Samples for Firewalls List. */ +public final class FirewallsListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_ListBySubscription_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsListBySubscriptionMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Firewalls_ListByResourceGroup + +```java +/** Samples for Firewalls ListByResourceGroup. */ +public final class FirewallsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().listByResourceGroup("firewall-rg", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_ListByResourceGroup_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsListByResourceGroupMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().listByResourceGroup("firewall-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### Firewalls_SaveLogProfile + +```java +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LogSettingsInner; +import com.azure.resourcemanager.paloaltonetworks.models.ApplicationInsights; +import com.azure.resourcemanager.paloaltonetworks.models.EventHub; +import com.azure.resourcemanager.paloaltonetworks.models.LogDestination; +import com.azure.resourcemanager.paloaltonetworks.models.LogOption; +import com.azure.resourcemanager.paloaltonetworks.models.LogType; +import com.azure.resourcemanager.paloaltonetworks.models.MonitorLog; +import com.azure.resourcemanager.paloaltonetworks.models.StorageAccount; + +/** Samples for Firewalls SaveLogProfile. */ +public final class FirewallsSaveLogProfileSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_saveLogProfile_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_saveLogProfile_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsSaveLogProfileMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .saveLogProfileWithResponse( + "firewall-rg", + "firewall1", + new LogSettingsInner() + .withLogType(LogType.TRAFFIC) + .withLogOption(LogOption.SAME_DESTINATION) + .withApplicationInsights( + new ApplicationInsights().withId("aaaaaaaaaaaaaaaa").withKey("fakeTokenPlaceholder")) + .withCommonDestination( + new LogDestination() + .withStorageConfigurations( + new StorageAccount() + .withId("aaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaa") + .withAccountName("aaaaaaaaaaaaaaaaaaaaaaa")) + .withEventHubConfigurations( + new EventHub() + .withId("aaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaa") + .withName("aaaaaaaa") + .withNameSpace("aaaaaaaaaaaaaaaaaaaaa") + .withPolicyName("aaaaaaaaaaaa")) + .withMonitorConfigurations( + new MonitorLog() + .withId("aaaaaaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaaaaa") + .withWorkspace("aaaaaaaaaaa") + .withPrimaryKey("fakeTokenPlaceholder") + .withSecondaryKey("fakeTokenPlaceholder"))) + .withTrafficLogDestination( + new LogDestination() + .withStorageConfigurations( + new StorageAccount() + .withId("aaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaa") + .withAccountName("aaaaaaaaaaaaaaaaaaaaaaa")) + .withEventHubConfigurations( + new EventHub() + .withId("aaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaa") + .withName("aaaaaaaa") + .withNameSpace("aaaaaaaaaaaaaaaaaaaaa") + .withPolicyName("aaaaaaaaaaaa")) + .withMonitorConfigurations( + new MonitorLog() + .withId("aaaaaaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaaaaa") + .withWorkspace("aaaaaaaaaaa") + .withPrimaryKey("fakeTokenPlaceholder") + .withSecondaryKey("fakeTokenPlaceholder"))) + .withThreatLogDestination( + new LogDestination() + .withStorageConfigurations( + new StorageAccount() + .withId("aaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaa") + .withAccountName("aaaaaaaaaaaaaaaaaaaaaaa")) + .withEventHubConfigurations( + new EventHub() + .withId("aaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaa") + .withName("aaaaaaaa") + .withNameSpace("aaaaaaaaaaaaaaaaaaaaa") + .withPolicyName("aaaaaaaaaaaa")) + .withMonitorConfigurations( + new MonitorLog() + .withId("aaaaaaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaaaaa") + .withWorkspace("aaaaaaaaaaa") + .withPrimaryKey("fakeTokenPlaceholder") + .withSecondaryKey("fakeTokenPlaceholder"))) + .withDecryptLogDestination( + new LogDestination() + .withStorageConfigurations( + new StorageAccount() + .withId("aaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaa") + .withAccountName("aaaaaaaaaaaaaaaaaaaaaaa")) + .withEventHubConfigurations( + new EventHub() + .withId("aaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaa") + .withName("aaaaaaaa") + .withNameSpace("aaaaaaaaaaaaaaaaaaaaa") + .withPolicyName("aaaaaaaaaaaa")) + .withMonitorConfigurations( + new MonitorLog() + .withId("aaaaaaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaaaaa") + .withWorkspace("aaaaaaaaaaa") + .withPrimaryKey("fakeTokenPlaceholder") + .withSecondaryKey("fakeTokenPlaceholder"))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_saveLogProfile_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_saveLogProfile_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsSaveLogProfileMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .saveLogProfileWithResponse("firewall-rg", "firewall1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Firewalls_Update + +```java +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerUserAssignedIdentity; +import com.azure.resourcemanager.paloaltonetworks.models.BillingCycle; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DnsProxy; +import com.azure.resourcemanager.paloaltonetworks.models.DnsSettings; +import com.azure.resourcemanager.paloaltonetworks.models.EgressNat; +import com.azure.resourcemanager.paloaltonetworks.models.EnabledDnsType; +import com.azure.resourcemanager.paloaltonetworks.models.EndpointConfiguration; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallResource; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallResourceUpdateProperties; +import com.azure.resourcemanager.paloaltonetworks.models.FrontendSetting; +import com.azure.resourcemanager.paloaltonetworks.models.IpAddress; +import com.azure.resourcemanager.paloaltonetworks.models.IpAddressSpace; +import com.azure.resourcemanager.paloaltonetworks.models.ManagedIdentityType; +import com.azure.resourcemanager.paloaltonetworks.models.MarketplaceDetails; +import com.azure.resourcemanager.paloaltonetworks.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.paloaltonetworks.models.NetworkProfile; +import com.azure.resourcemanager.paloaltonetworks.models.NetworkType; +import com.azure.resourcemanager.paloaltonetworks.models.PanoramaConfig; +import com.azure.resourcemanager.paloaltonetworks.models.PlanData; +import com.azure.resourcemanager.paloaltonetworks.models.ProtocolType; +import com.azure.resourcemanager.paloaltonetworks.models.RulestackDetails; +import com.azure.resourcemanager.paloaltonetworks.models.UsageType; +import com.azure.resourcemanager.paloaltonetworks.models.VnetConfiguration; +import com.azure.resourcemanager.paloaltonetworks.models.VwanConfiguration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Firewalls Update. */ +public final class FirewallsUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Update_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_Update_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + FirewallResource resource = + manager + .firewalls() + .getByResourceGroupWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_Update_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + FirewallResource resource = + manager + .firewalls() + .getByResourceGroupWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("tagName", "value")) + .withIdentity( + new AzureResourceManagerManagedIdentityProperties() + .withType(ManagedIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "key16", + new AzureResourceManagerUserAssignedIdentity() + .withClientId("aaaa") + .withPrincipalId("aaaaaaaaaaaaaaa")))) + .withProperties( + new FirewallResourceUpdateProperties() + .withPanEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withNetworkProfile( + new NetworkProfile() + .withVnetConfiguration( + new VnetConfiguration() + .withVnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet") + .withAddressSpace("10.1.0.0/16")) + .withTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withUnTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withIpOfTrustSubnetForUdr( + new IpAddress() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddress("10.1.1.0/24"))) + .withVwanConfiguration( + new VwanConfiguration() + .withNetworkVirtualApplianceId("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withVHub( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withUnTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withIpOfTrustSubnetForUdr( + new IpAddress() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddress("10.1.1.0/24"))) + .withNetworkType(NetworkType.VNET) + .withPublicIps( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1") + .withAddress("20.22.92.11"))) + .withEnableEgressNat(EgressNat.ENABLED) + .withEgressNatIp( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1") + .withAddress("20.22.92.111")))) + .withIsPanoramaManaged(BooleanEnum.TRUE) + .withPanoramaConfig(new PanoramaConfig().withConfigString("bas64EncodedString")) + .withAssociatedRulestack( + new RulestackDetails() + .withResourceId("aaaaaaaaaa") + .withRulestackId("aaaaaaaaaaaaaaaa") + .withLocation("eastus")) + .withDnsSettings( + new DnsSettings() + .withEnableDnsProxy(DnsProxy.DISABLED) + .withEnabledDnsType(EnabledDnsType.CUSTOM) + .withDnsServers( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1") + .withAddress("20.22.92.111")))) + .withFrontEndSettings( + Arrays + .asList( + new FrontendSetting() + .withName("frontendsetting11") + .withProtocol(ProtocolType.TCP) + .withFrontendConfiguration( + new EndpointConfiguration() + .withPort("80") + .withAddress( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp1") + .withAddress("20.22.91.251"))) + .withBackendConfiguration( + new EndpointConfiguration() + .withPort("80") + .withAddress( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp2") + .withAddress("20.22.32.136"))))) + .withPlanData( + new PlanData() + .withUsageType(UsageType.PAYG) + .withBillingCycle(BillingCycle.WEEKLY) + .withPlanId("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")) + .withMarketplaceDetails( + new MarketplaceDetails() + .withOfferId("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + .withPublisherId("aaaa") + .withMarketplaceSubscriptionStatus( + MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START))) + .apply(); + } + + @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; + } +} +``` + +### FqdnListGlobalRulestack_CreateOrUpdate + +```java +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListGlobalRulestackResourceInner; +import java.util.Arrays; + +/** Samples for FqdnListGlobalRulestack CreateOrUpdate. */ +public final class FqdnListGlobalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .fqdnListGlobalRulestacks() + .createOrUpdate( + "praval", + "armid1", + new FqdnListGlobalRulestackResourceInner() + .withDescription("string") + .withFqdnList(Arrays.asList("string1", "string2")) + .withEtag("aaaaaaaaaaaaaaaaaa") + .withAuditComment("string"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .fqdnListGlobalRulestacks() + .createOrUpdate( + "praval", + "armid1", + new FqdnListGlobalRulestackResourceInner().withFqdnList(Arrays.asList("string1", "string2")), + com.azure.core.util.Context.NONE); + } +} +``` + +### FqdnListGlobalRulestack_Delete + +```java +/** Samples for FqdnListGlobalRulestack Delete. */ +public final class FqdnListGlobalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListGlobalRulestacks().delete("praval", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListGlobalRulestacks().delete("praval", "armid1", com.azure.core.util.Context.NONE); + } +} +``` + +### FqdnListGlobalRulestack_Get + +```java +/** Samples for FqdnListGlobalRulestack Get. */ +public final class FqdnListGlobalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListGlobalRulestacks().getWithResponse("praval", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListGlobalRulestacks().getWithResponse("praval", "armid1", com.azure.core.util.Context.NONE); + } +} +``` + +### FqdnListGlobalRulestack_List + +```java +/** Samples for FqdnListGlobalRulestack List. */ +public final class FqdnListGlobalRulestackListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_List_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListGlobalRulestacks().list("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_List_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListGlobalRulestacks().list("praval", com.azure.core.util.Context.NONE); + } +} +``` + +### FqdnListLocalRulestack_CreateOrUpdate + +```java +import java.util.Arrays; + +/** Samples for FqdnListLocalRulestack CreateOrUpdate. */ +public final class FqdnListLocalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .fqdnListLocalRulestacks() + .define("armid1") + .withExistingLocalRulestack("rgopenapi", "lrs1") + .withFqdnList(Arrays.asList("string1", "string2")) + .withDescription("string") + .withEtag("aaaaaaaaaaaaaaaaaa") + .withAuditComment("string") + .create(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .fqdnListLocalRulestacks() + .define("armid1") + .withExistingLocalRulestack("rgopenapi", "lrs1") + .withFqdnList(Arrays.asList("string1", "string2")) + .create(); + } +} +``` + +### FqdnListLocalRulestack_Delete + +```java +/** Samples for FqdnListLocalRulestack Delete. */ +public final class FqdnListLocalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListLocalRulestacks().delete("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListLocalRulestacks().delete("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } +} +``` + +### FqdnListLocalRulestack_Get + +```java +/** Samples for FqdnListLocalRulestack Get. */ +public final class FqdnListLocalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .fqdnListLocalRulestacks() + .getWithResponse("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .fqdnListLocalRulestacks() + .getWithResponse("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } +} +``` + +### FqdnListLocalRulestack_ListByLocalRulestacks + +```java +/** Samples for FqdnListLocalRulestack ListByLocalRulestacks. */ +public final class FqdnListLocalRulestackListByLocalRulestacksSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackListByLocalRulestacksMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListLocalRulestacks().listByLocalRulestacks("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackListByLocalRulestacksMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListLocalRulestacks().listByLocalRulestacks("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_Commit + +```java +/** Samples for GlobalRulestack Commit. */ +public final class GlobalRulestackCommitSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_commit_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_commit_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackCommitMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().commit("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_commit_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_commit_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackCommitMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().commit("praval", com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_CreateOrUpdate + +```java +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerUserAssignedIdentity; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.ManagedIdentityType; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for GlobalRulestack CreateOrUpdate. */ +public final class GlobalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .createOrUpdate( + "praval", new GlobalRulestackResourceInner().withLocation("eastus"), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .createOrUpdate( + "praval", + new GlobalRulestackResourceInner() + .withLocation("eastus") + .withIdentity( + new AzureResourceManagerManagedIdentityProperties() + .withType(ManagedIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "key16", + new AzureResourceManagerUserAssignedIdentity() + .withClientId("aaaa") + .withPrincipalId("aaaaaaaaaaaaaaa")))) + .withPanEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withPanLocation("eastus") + .withScope(ScopeType.GLOBAL) + .withAssociatedSubscriptions(Arrays.asList("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")) + .withDescription("global rulestacks") + .withDefaultMode(DefaultMode.IPS) + .withMinAppIdVersion("8.5.3") + .withSecurityServices( + new SecurityServices() + .withVulnerabilityProfile("default") + .withAntiSpywareProfile("default") + .withAntiVirusProfile("default") + .withUrlFilteringProfile("default") + .withFileBlockingProfile("default") + .withDnsSubscription("default") + .withOutboundUnTrustCertificate("default") + .withOutboundTrustCertificate("default")), + com.azure.core.util.Context.NONE); + } + + @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; + } +} +``` + +### GlobalRulestack_Delete + +```java +/** Samples for GlobalRulestack Delete. */ +public final class GlobalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().delete("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().delete("praval", com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_Get + +```java +/** Samples for GlobalRulestack Get. */ +public final class GlobalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().getWithResponse("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().getWithResponse("praval", com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_GetChangeLog + +```java +/** Samples for GlobalRulestack GetChangeLog. */ +public final class GlobalRulestackGetChangeLogSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_getChangeLog_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_getChangeLog_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackGetChangeLogMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().getChangeLogWithResponse("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_getChangeLog_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_getChangeLog_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackGetChangeLogMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().getChangeLogWithResponse("praval", com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_List + +```java +/** Samples for GlobalRulestack List. */ +public final class GlobalRulestackListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_List_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_List_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().list(com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_ListAdvancedSecurityObjects + +```java +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectTypeEnum; + +/** Samples for GlobalRulestack ListAdvancedSecurityObjects. */ +public final class GlobalRulestackListAdvancedSecurityObjectsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listAdvancedSecurityObjects_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listAdvancedSecurityObjects_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListAdvancedSecurityObjectsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listAdvancedSecurityObjectsWithResponse( + "praval", + AdvSecurityObjectTypeEnum.fromString("globalRulestacks"), + "a6a321", + 20, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listAdvancedSecurityObjects_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listAdvancedSecurityObjects_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListAdvancedSecurityObjectsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listAdvancedSecurityObjectsWithResponse( + "praval", + AdvSecurityObjectTypeEnum.fromString("globalRulestacks"), + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_ListAppIds + +```java +/** Samples for GlobalRulestack ListAppIds. */ +public final class GlobalRulestackListAppIdsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listAppIds_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listAppIds_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListAppIdsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listAppIdsWithResponse("praval", "8543", "pref", "a6a321", 20, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listAppIds_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listAppIds_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListAppIdsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listAppIdsWithResponse("praval", null, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_ListCountries + +```java +/** Samples for GlobalRulestack ListCountries. */ +public final class GlobalRulestackListCountriesSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listCountries_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listCountries_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListCountriesMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().listCountriesWithResponse("praval", null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listCountries_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listCountries_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListCountriesMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().listCountriesWithResponse("praval", "a6a321", 20, com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_ListFirewalls + +```java +/** Samples for GlobalRulestack ListFirewalls. */ +public final class GlobalRulestackListFirewallsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listFirewalls_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listFirewalls_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListFirewallsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().listFirewallsWithResponse("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listFirewalls_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listFirewalls_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListFirewallsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().listFirewallsWithResponse("praval", com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_ListPredefinedUrlCategories + +```java +/** Samples for GlobalRulestack ListPredefinedUrlCategories. */ +public final class GlobalRulestackListPredefinedUrlCategoriesSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listPredefinedUrlCategories_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listPredefinedUrlCategories_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListPredefinedUrlCategoriesMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listPredefinedUrlCategoriesWithResponse("praval", "a6a321", 20, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listPredefinedUrlCategories_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listPredefinedUrlCategories_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListPredefinedUrlCategoriesMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listPredefinedUrlCategoriesWithResponse("praval", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_ListSecurityServices + +```java +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesTypeEnum; + +/** Samples for GlobalRulestack ListSecurityServices. */ +public final class GlobalRulestackListSecurityServicesSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listSecurityServices_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listSecurityServices_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListSecurityServicesMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listSecurityServicesWithResponse( + "praval", + SecurityServicesTypeEnum.fromString("globalRulestacks"), + null, + null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listSecurityServices_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listSecurityServices_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListSecurityServicesMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listSecurityServicesWithResponse( + "praval", + SecurityServicesTypeEnum.fromString("globalRulestacks"), + "a6a321", + 20, + com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_Revert + +```java +/** Samples for GlobalRulestack Revert. */ +public final class GlobalRulestackRevertSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_revert_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_revert_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackRevertMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().revertWithResponse("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_revert_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_revert_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackRevertMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().revertWithResponse("praval", com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalRulestack_Update + +```java +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerUserAssignedIdentity; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackResourceUpdate; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackResourceUpdateProperties; +import com.azure.resourcemanager.paloaltonetworks.models.ManagedIdentityType; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for GlobalRulestack Update. */ +public final class GlobalRulestackUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Update_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_Update_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .updateWithResponse( + "praval", + new GlobalRulestackResourceUpdate() + .withLocation("eastus") + .withIdentity( + new AzureResourceManagerManagedIdentityProperties() + .withType(ManagedIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "key16", + new AzureResourceManagerUserAssignedIdentity() + .withClientId("aaaa") + .withPrincipalId("aaaaaaaaaaaaaaa")))) + .withProperties( + new GlobalRulestackResourceUpdateProperties() + .withPanEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withPanLocation("eastus") + .withScope(ScopeType.GLOBAL) + .withAssociatedSubscriptions(Arrays.asList("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")) + .withDescription("global rulestacks") + .withDefaultMode(DefaultMode.IPS) + .withMinAppIdVersion("8.5.3") + .withSecurityServices( + new SecurityServices() + .withVulnerabilityProfile("default") + .withAntiSpywareProfile("default") + .withAntiVirusProfile("default") + .withUrlFilteringProfile("default") + .withFileBlockingProfile("default") + .withDnsSubscription("default") + .withOutboundUnTrustCertificate("default") + .withOutboundTrustCertificate("default"))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Update_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_Update_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .updateWithResponse("praval", new GlobalRulestackResourceUpdate(), com.azure.core.util.Context.NONE); + } + + @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; + } +} +``` + +### LocalRules_CreateOrUpdate + +```java +import com.azure.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import java.util.Arrays; + +/** Samples for LocalRules CreateOrUpdate. */ +public final class LocalRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .define("1") + .withExistingLocalRulestack("firewall-rg", "lrs1") + .withRuleName("localRule1") + .create(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .define("1") + .withExistingLocalRulestack("firewall-rg", "lrs1") + .withRuleName("localRule1") + .withTags(Arrays.asList(new TagInfo().withKey("fakeTokenPlaceholder").withValue("value"))) + .withEtag("c18e6eef-ba3e-49ee-8a85-2b36c863a9d0") + .withDescription("description of local rule") + .withRuleState(StateEnum.DISABLED) + .withSource( + new SourceAddr() + .withCidrs(Arrays.asList("1.0.0.1/10")) + .withCountries(Arrays.asList("India")) + .withFeeds(Arrays.asList("feed")) + .withPrefixLists(Arrays.asList("PL1"))) + .withNegateSource(BooleanEnum.TRUE) + .withDestination( + new DestinationAddr() + .withCidrs(Arrays.asList("1.0.0.1/10")) + .withCountries(Arrays.asList("India")) + .withFeeds(Arrays.asList("feed")) + .withPrefixLists(Arrays.asList("PL1")) + .withFqdnLists(Arrays.asList("FQDN1"))) + .withNegateDestination(BooleanEnum.TRUE) + .withApplications(Arrays.asList("app1")) + .withCategory( + new Category().withUrlCustom(Arrays.asList("https://microsoft.com")).withFeeds(Arrays.asList("feed"))) + .withProtocol("HTTP") + .withProtocolPortList(Arrays.asList("80")) + .withInboundInspectionCertificate("cert1") + .withAuditComment("example comment") + .withActionType(ActionEnum.ALLOW) + .withEnableLogging(StateEnum.DISABLED) + .withDecryptionRuleType(DecryptionRuleTypeEnum.SSLOUTBOUND_INSPECTION) + .create(); + } +} +``` + +### LocalRules_Delete + +```java +/** Samples for LocalRules Delete. */ +public final class LocalRulesDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRules().delete("firewall-rg", "lrs1", "1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRules().delete("firewall-rg", "lrs1", "1", com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRules_Get + +```java +/** Samples for LocalRules Get. */ +public final class LocalRulesGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_Get_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRules().getWithResponse("firewall-rg", "lrs1", "1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_Get_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRules().getWithResponse("firewall-rg", "lrs1", "1", com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRules_GetCounters + +```java +/** Samples for LocalRules GetCounters. */ +public final class LocalRulesGetCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_getCounters_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_getCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesGetCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .getCountersWithResponse("firewall-rg", "lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_getCounters_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_getCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesGetCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .getCountersWithResponse("firewall-rg", "lrs1", "1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRules_ListByLocalRulestacks + +```java +/** Samples for LocalRules ListByLocalRulestacks. */ +public final class LocalRulesListByLocalRulestacksSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_ListByLocalRulestacks_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_ListByLocalRulestacks_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesListByLocalRulestacksMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRules().listByLocalRulestacks("firewall-rg", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_ListByLocalRulestacks_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_ListByLocalRulestacks_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesListByLocalRulestacksMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRules().listByLocalRulestacks("firewall-rg", "lrs1", com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRules_RefreshCounters + +```java +/** Samples for LocalRules RefreshCounters. */ +public final class LocalRulesRefreshCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_refreshCounters_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_refreshCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesRefreshCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .refreshCountersWithResponse("firewall-rg", "lrs1", "1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_refreshCounters_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_refreshCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesRefreshCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .refreshCountersWithResponse("firewall-rg", "lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRules_ResetCounters + +```java +/** Samples for LocalRules ResetCounters. */ +public final class LocalRulesResetCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_resetCounters_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_resetCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesResetCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .resetCountersWithResponse("firewall-rg", "lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_resetCounters_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_resetCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesResetCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .resetCountersWithResponse("firewall-rg", "lrs1", "1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_Commit + +```java +/** Samples for LocalRulestacks Commit. */ +public final class LocalRulestacksCommitSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_commit_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_commit_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksCommitMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().commit("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_commit_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_commit_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksCommitMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().commit("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_CreateOrUpdate + +```java +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerUserAssignedIdentity; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.ManagedIdentityType; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for LocalRulestacks CreateOrUpdate. */ +public final class LocalRulestacksCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().define("lrs1").withRegion("eastus").withExistingResourceGroup("rgopenapi").create(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .define("lrs1") + .withRegion("eastus") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("tagName", "value")) + .withIdentity( + new AzureResourceManagerManagedIdentityProperties() + .withType(ManagedIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "key16", + new AzureResourceManagerUserAssignedIdentity() + .withClientId("aaaa") + .withPrincipalId("aaaaaaaaaaaaaaa")))) + .withPanEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withPanLocation("eastus") + .withScope(ScopeType.LOCAL) + .withAssociatedSubscriptions(Arrays.asList("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")) + .withDescription("local rulestacks") + .withDefaultMode(DefaultMode.IPS) + .withMinAppIdVersion("8.5.3") + .withSecurityServices( + new SecurityServices() + .withVulnerabilityProfile("default") + .withAntiSpywareProfile("default") + .withAntiVirusProfile("default") + .withUrlFilteringProfile("default") + .withFileBlockingProfile("default") + .withDnsSubscription("default") + .withOutboundUnTrustCertificate("default") + .withOutboundTrustCertificate("default")) + .create(); + } + + @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; + } +} +``` + +### LocalRulestacks_Delete + +```java +/** Samples for LocalRulestacks Delete. */ +public final class LocalRulestacksDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().delete("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().delete("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_GetByResourceGroup + +```java +/** Samples for LocalRulestacks GetByResourceGroup. */ +public final class LocalRulestacksGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Get_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().getByResourceGroupWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Get_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().getByResourceGroupWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_GetChangeLog + +```java +/** Samples for LocalRulestacks GetChangeLog. */ +public final class LocalRulestacksGetChangeLogSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_getChangeLog_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_getChangeLog_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksGetChangeLogMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().getChangeLogWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_getChangeLog_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_getChangeLog_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksGetChangeLogMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().getChangeLogWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_GetSupportInfo + +```java +/** Samples for LocalRulestacks GetSupportInfo. */ +public final class LocalRulestacksGetSupportInfoSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_getSupportInfo_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_getSupportInfo_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksGetSupportInfoMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .getSupportInfoWithResponse("rgopenapi", "lrs1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_getSupportInfo_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_getSupportInfo_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksGetSupportInfoMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .getSupportInfoWithResponse("rgopenapi", "lrs1", "user1@domain.com", com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_List + +```java +/** Samples for LocalRulestacks List. */ +public final class LocalRulestacksListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_ListBySubscription_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListBySubscriptionMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().list(com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_ListAdvancedSecurityObjects + +```java +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectTypeEnum; + +/** Samples for LocalRulestacks ListAdvancedSecurityObjects. */ +public final class LocalRulestacksListAdvancedSecurityObjectsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listAdvancedSecurityObjects_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listAdvancedSecurityObjects_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListAdvancedSecurityObjectsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listAdvancedSecurityObjectsWithResponse( + "rgopenapi", + "lrs1", + AdvSecurityObjectTypeEnum.fromString("localRulestacks"), + "a6a321", + 20, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listAdvancedSecurityObjects_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listAdvancedSecurityObjects_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListAdvancedSecurityObjectsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listAdvancedSecurityObjectsWithResponse( + "rgopenapi", + "lrs1", + AdvSecurityObjectTypeEnum.fromString("localRulestacks"), + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_ListAppIds + +```java +/** Samples for LocalRulestacks ListAppIds. */ +public final class LocalRulestacksListAppIdsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listAppIds_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listAppIds_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListAppIdsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listAppIdsWithResponse( + "rgopenapi", "lrs1", "8543", "pref", "a6a321", 20, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listAppIds_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listAppIds_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListAppIdsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listAppIdsWithResponse("rgopenapi", "lrs1", null, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_ListByResourceGroup + +```java +/** Samples for LocalRulestacks ListByResourceGroup. */ +public final class LocalRulestacksListByResourceGroupSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_ListByResourceGroup_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListByResourceGroupMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_ListCountries + +```java +/** Samples for LocalRulestacks ListCountries. */ +public final class LocalRulestacksListCountriesSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listCountries_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listCountries_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListCountriesMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listCountriesWithResponse("rgopenapi", "lrs1", "a6a321", 20, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listCountries_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listCountries_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListCountriesMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listCountriesWithResponse("rgopenapi", "lrs1", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_ListFirewalls + +```java +/** Samples for LocalRulestacks ListFirewalls. */ +public final class LocalRulestacksListFirewallsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listFirewalls_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listFirewalls_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListFirewallsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().listFirewallsWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listFirewalls_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listFirewalls_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListFirewallsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().listFirewallsWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_ListPredefinedUrlCategories + +```java +/** Samples for LocalRulestacks ListPredefinedUrlCategories. */ +public final class LocalRulestacksListPredefinedUrlCategoriesSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listPredefinedUrlCategories_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listPredefinedUrlCategories_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListPredefinedUrlCategoriesMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listPredefinedUrlCategoriesWithResponse("rgopenapi", "lrs1", null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listPredefinedUrlCategories_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listPredefinedUrlCategories_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListPredefinedUrlCategoriesMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listPredefinedUrlCategoriesWithResponse( + "rgopenapi", "lrs1", "a6a321", 20, com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_ListSecurityServices + +```java +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesTypeEnum; + +/** Samples for LocalRulestacks ListSecurityServices. */ +public final class LocalRulestacksListSecurityServicesSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listSecurityServices_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listSecurityServices_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListSecurityServicesMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listSecurityServicesWithResponse( + "rgopenapi", + "lrs1", + SecurityServicesTypeEnum.fromString("localRulestacks"), + null, + null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listSecurityServices_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listSecurityServices_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListSecurityServicesMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listSecurityServicesWithResponse( + "rgopenapi", + "lrs1", + SecurityServicesTypeEnum.fromString("localRulestacks"), + "a6a321", + 20, + com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_Revert + +```java +/** Samples for LocalRulestacks Revert. */ +public final class LocalRulestacksRevertSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_revert_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_revert_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksRevertMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().revertWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_revert_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_revert_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksRevertMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().revertWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} +``` + +### LocalRulestacks_Update + +```java +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerUserAssignedIdentity; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestackResourceUpdateProperties; +import com.azure.resourcemanager.paloaltonetworks.models.ManagedIdentityType; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for LocalRulestacks Update. */ +public final class LocalRulestacksUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Update_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_Update_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + LocalRulestackResource resource = + manager + .localRulestacks() + .getByResourceGroupWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("tagName", "value")) + .withIdentity( + new AzureResourceManagerManagedIdentityProperties() + .withType(ManagedIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "key16", + new AzureResourceManagerUserAssignedIdentity() + .withClientId("aaaa") + .withPrincipalId("aaaaaaaaaaaaaaa")))) + .withProperties( + new LocalRulestackResourceUpdateProperties() + .withPanEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withPanLocation("eastus") + .withScope(ScopeType.LOCAL) + .withAssociatedSubscriptions(Arrays.asList("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")) + .withDescription("local rulestacks") + .withDefaultMode(DefaultMode.IPS) + .withMinAppIdVersion("8.5.3") + .withSecurityServices( + new SecurityServices() + .withVulnerabilityProfile("default") + .withAntiSpywareProfile("default") + .withAntiVirusProfile("default") + .withUrlFilteringProfile("default") + .withFileBlockingProfile("default") + .withDnsSubscription("default") + .withOutboundUnTrustCertificate("default") + .withOutboundTrustCertificate("default"))) + .apply(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Update_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_Update_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + LocalRulestackResource resource = + manager + .localRulestacks() + .getByResourceGroupWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + @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; + } +} +``` + +### Operations_List + +```java +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Operations_List_MinimumSet_Gen.json + */ + /** + * Sample code: Operations_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void operationsListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Operations_List_MaximumSet_Gen.json + */ + /** + * Sample code: Operations_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void operationsListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PostRules_CreateOrUpdate + +```java +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PostRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import java.util.Arrays; + +/** Samples for PostRules CreateOrUpdate. */ +public final class PostRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .postRules() + .createOrUpdate( + "lrs1", + "1", + new PostRulesResourceInner() + .withEtag("c18e6eef-ba3e-49ee-8a85-2b36c863a9d0") + .withRuleName("postRule1") + .withDescription("description of post rule") + .withRuleState(StateEnum.DISABLED) + .withSource( + new SourceAddr() + .withCidrs(Arrays.asList("1.0.0.1/10")) + .withCountries(Arrays.asList("India")) + .withFeeds(Arrays.asList("feed")) + .withPrefixLists(Arrays.asList("PL1"))) + .withNegateSource(BooleanEnum.TRUE) + .withDestination( + new DestinationAddr() + .withCidrs(Arrays.asList("1.0.0.1/10")) + .withCountries(Arrays.asList("India")) + .withFeeds(Arrays.asList("feed")) + .withPrefixLists(Arrays.asList("PL1")) + .withFqdnLists(Arrays.asList("FQDN1"))) + .withNegateDestination(BooleanEnum.TRUE) + .withApplications(Arrays.asList("app1")) + .withCategory( + new Category() + .withUrlCustom(Arrays.asList("https://microsoft.com")) + .withFeeds(Arrays.asList("feed"))) + .withProtocol("HTTP") + .withProtocolPortList(Arrays.asList("80")) + .withInboundInspectionCertificate("cert1") + .withAuditComment("example comment") + .withActionType(ActionEnum.ALLOW) + .withEnableLogging(StateEnum.DISABLED) + .withDecryptionRuleType(DecryptionRuleTypeEnum.SSLOUTBOUND_INSPECTION) + .withTags(Arrays.asList(new TagInfo().withKey("fakeTokenPlaceholder").withValue("value"))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .postRules() + .createOrUpdate( + "lrs1", "1", new PostRulesResourceInner().withRuleName("postRule1"), com.azure.core.util.Context.NONE); + } +} +``` + +### PostRules_Delete + +```java +/** Samples for PostRules Delete. */ +public final class PostRulesDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().delete("lrs1", "1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().delete("lrs1", "1", com.azure.core.util.Context.NONE); + } +} +``` + +### PostRules_Get + +```java +/** Samples for PostRules Get. */ +public final class PostRulesGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_Get_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().getWithResponse("lrs1", "1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_Get_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().getWithResponse("lrs1", "1", com.azure.core.util.Context.NONE); + } +} +``` + +### PostRules_GetCounters + +```java +/** Samples for PostRules GetCounters. */ +public final class PostRulesGetCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_getCounters_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_getCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesGetCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().getCountersWithResponse("lrs1", "1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_getCounters_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_getCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesGetCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().getCountersWithResponse("lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } +} +``` + +### PostRules_List + +```java +/** Samples for PostRules List. */ +public final class PostRulesListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_List_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().list("lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_List_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().list("lrs1", com.azure.core.util.Context.NONE); + } +} +``` + +### PostRules_RefreshCounters + +```java +/** Samples for PostRules RefreshCounters. */ +public final class PostRulesRefreshCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_refreshCounters_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_refreshCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesRefreshCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().refreshCountersWithResponse("lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_refreshCounters_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_refreshCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesRefreshCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().refreshCountersWithResponse("lrs1", "1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### PostRules_ResetCounters + +```java +/** Samples for PostRules ResetCounters. */ +public final class PostRulesResetCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_resetCounters_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_resetCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesResetCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().resetCountersWithResponse("lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_resetCounters_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_resetCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesResetCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().resetCountersWithResponse("lrs1", "1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### PreRules_CreateOrUpdate + +```java +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PreRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import java.util.Arrays; + +/** Samples for PreRules CreateOrUpdate. */ +public final class PreRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .preRules() + .createOrUpdate( + "lrs1", + "1", + new PreRulesResourceInner() + .withEtag("c18e6eef-ba3e-49ee-8a85-2b36c863a9d0") + .withRuleName("preRule1") + .withDescription("description of pre rule") + .withRuleState(StateEnum.DISABLED) + .withSource( + new SourceAddr() + .withCidrs(Arrays.asList("1.0.0.1/10")) + .withCountries(Arrays.asList("India")) + .withFeeds(Arrays.asList("feed")) + .withPrefixLists(Arrays.asList("PL1"))) + .withNegateSource(BooleanEnum.TRUE) + .withDestination( + new DestinationAddr() + .withCidrs(Arrays.asList("1.0.0.1/10")) + .withCountries(Arrays.asList("India")) + .withFeeds(Arrays.asList("feed")) + .withPrefixLists(Arrays.asList("PL1")) + .withFqdnLists(Arrays.asList("FQDN1"))) + .withNegateDestination(BooleanEnum.TRUE) + .withApplications(Arrays.asList("app1")) + .withCategory( + new Category() + .withUrlCustom(Arrays.asList("https://microsoft.com")) + .withFeeds(Arrays.asList("feed"))) + .withProtocol("HTTP") + .withProtocolPortList(Arrays.asList("80")) + .withInboundInspectionCertificate("cert1") + .withAuditComment("example comment") + .withActionType(ActionEnum.ALLOW) + .withEnableLogging(StateEnum.DISABLED) + .withDecryptionRuleType(DecryptionRuleTypeEnum.SSLOUTBOUND_INSPECTION) + .withTags(Arrays.asList(new TagInfo().withKey("fakeTokenPlaceholder").withValue("value"))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .preRules() + .createOrUpdate( + "lrs1", "1", new PreRulesResourceInner().withRuleName("preRule1"), com.azure.core.util.Context.NONE); + } +} +``` + +### PreRules_Delete + +```java +/** Samples for PreRules Delete. */ +public final class PreRulesDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().delete("lrs1", "1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().delete("lrs1", "1", com.azure.core.util.Context.NONE); + } +} +``` + +### PreRules_Get + +```java +/** Samples for PreRules Get. */ +public final class PreRulesGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_Get_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().getWithResponse("lrs1", "1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_Get_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().getWithResponse("lrs1", "1", com.azure.core.util.Context.NONE); + } +} +``` + +### PreRules_GetCounters + +```java +/** Samples for PreRules GetCounters. */ +public final class PreRulesGetCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_getCounters_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_getCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesGetCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().getCountersWithResponse("lrs1", "1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_getCounters_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_getCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesGetCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().getCountersWithResponse("lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } +} +``` + +### PreRules_List + +```java +/** Samples for PreRules List. */ +public final class PreRulesListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_List_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().list("lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_List_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().list("lrs1", com.azure.core.util.Context.NONE); + } +} +``` + +### PreRules_RefreshCounters + +```java +/** Samples for PreRules RefreshCounters. */ +public final class PreRulesRefreshCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_refreshCounters_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_refreshCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesRefreshCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().refreshCountersWithResponse("lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_refreshCounters_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_refreshCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesRefreshCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().refreshCountersWithResponse("lrs1", "1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### PreRules_ResetCounters + +```java +/** Samples for PreRules ResetCounters. */ +public final class PreRulesResetCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_resetCounters_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_resetCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesResetCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().resetCountersWithResponse("lrs1", "1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_resetCounters_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_resetCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesResetCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().resetCountersWithResponse("lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrefixListGlobalRulestack_CreateOrUpdate + +```java +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListGlobalRulestackResourceInner; +import java.util.Arrays; + +/** Samples for PrefixListGlobalRulestack CreateOrUpdate. */ +public final class PrefixListGlobalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListGlobalRulestacks() + .createOrUpdate( + "praval", + "armid1", + new PrefixListGlobalRulestackResourceInner() + .withDescription("string") + .withPrefixList(Arrays.asList("1.0.0.0/24")) + .withEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c27") + .withAuditComment("comment"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListGlobalRulestacks() + .createOrUpdate( + "praval", + "armid1", + new PrefixListGlobalRulestackResourceInner().withPrefixList(Arrays.asList("1.0.0.0/24")), + com.azure.core.util.Context.NONE); + } +} +``` + +### PrefixListGlobalRulestack_Delete + +```java +/** Samples for PrefixListGlobalRulestack Delete. */ +public final class PrefixListGlobalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListGlobalRulestacks().delete("praval", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListGlobalRulestacks().delete("praval", "armid1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrefixListGlobalRulestack_Get + +```java +/** Samples for PrefixListGlobalRulestack Get. */ +public final class PrefixListGlobalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListGlobalRulestacks().getWithResponse("praval", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListGlobalRulestacks().getWithResponse("praval", "armid1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrefixListGlobalRulestack_List + +```java +/** Samples for PrefixListGlobalRulestack List. */ +public final class PrefixListGlobalRulestackListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_List_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListGlobalRulestacks().list("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_List_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListGlobalRulestacks().list("praval", com.azure.core.util.Context.NONE); + } +} +``` + +### PrefixListLocalRulestack_CreateOrUpdate + +```java +import java.util.Arrays; + +/** Samples for PrefixListLocalRulestack CreateOrUpdate. */ +public final class PrefixListLocalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListLocalRulestacks() + .define("armid1") + .withExistingLocalRulestack("rgopenapi", "lrs1") + .withPrefixList(Arrays.asList("1.0.0.0/24")) + .create(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListLocalRulestacks() + .define("armid1") + .withExistingLocalRulestack("rgopenapi", "lrs1") + .withPrefixList(Arrays.asList("1.0.0.0/24")) + .withDescription("string") + .withEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c27") + .withAuditComment("comment") + .create(); + } +} +``` + +### PrefixListLocalRulestack_Delete + +```java +/** Samples for PrefixListLocalRulestack Delete. */ +public final class PrefixListLocalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListLocalRulestacks().delete("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListLocalRulestacks().delete("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrefixListLocalRulestack_Get + +```java +/** Samples for PrefixListLocalRulestack Get. */ +public final class PrefixListLocalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListLocalRulestacks() + .getWithResponse("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListLocalRulestacks() + .getWithResponse("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrefixListLocalRulestack_ListByLocalRulestacks + +```java +/** Samples for PrefixListLocalRulestack ListByLocalRulestacks. */ +public final class PrefixListLocalRulestackListByLocalRulestacksSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackListByLocalRulestacksMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListLocalRulestacks() + .listByLocalRulestacks("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackListByLocalRulestacksMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListLocalRulestacks() + .listByLocalRulestacks("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/pom.xml b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/pom.xml new file mode 100644 index 000000000000..f7508d437eeb --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/pom.xml @@ -0,0 +1,61 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-paloaltonetworks + 1.0.0-beta.1 + jar + + Microsoft Azure SDK for PaloAlto Networks Ngfw Management + This package contains Microsoft Azure SDK for PaloAlto Networks Ngfw Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2022-08-29-preview. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0 + 0 + + + + com.azure + azure-core + 1.38.0 + + + com.azure + azure-core-management + 1.11.0 + + + diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/PaloAltoNetworksNgfwManager.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/PaloAltoNetworksNgfwManager.java new file mode 100644 index 000000000000..be8d743c07d8 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/PaloAltoNetworksNgfwManager.java @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.PaloAltoNetworksCloudngfw; +import com.azure.resourcemanager.paloaltonetworks.implementation.CertificateObjectGlobalRulestacksImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.CertificateObjectLocalRulestacksImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.FirewallStatusImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.FirewallsImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.FqdnListGlobalRulestacksImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.FqdnListLocalRulestacksImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.GlobalRulestacksImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.LocalRulesImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.LocalRulestacksImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.OperationsImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.PaloAltoNetworksCloudngfwBuilder; +import com.azure.resourcemanager.paloaltonetworks.implementation.PostRulesImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.PreRulesImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.PrefixListGlobalRulestacksImpl; +import com.azure.resourcemanager.paloaltonetworks.implementation.PrefixListLocalRulestacksImpl; +import com.azure.resourcemanager.paloaltonetworks.models.CertificateObjectGlobalRulestacks; +import com.azure.resourcemanager.paloaltonetworks.models.CertificateObjectLocalRulestacks; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallStatus; +import com.azure.resourcemanager.paloaltonetworks.models.Firewalls; +import com.azure.resourcemanager.paloaltonetworks.models.FqdnListGlobalRulestacks; +import com.azure.resourcemanager.paloaltonetworks.models.FqdnListLocalRulestacks; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestacks; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRules; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestacks; +import com.azure.resourcemanager.paloaltonetworks.models.Operations; +import com.azure.resourcemanager.paloaltonetworks.models.PostRules; +import com.azure.resourcemanager.paloaltonetworks.models.PreRules; +import com.azure.resourcemanager.paloaltonetworks.models.PrefixListGlobalRulestacks; +import com.azure.resourcemanager.paloaltonetworks.models.PrefixListLocalRulestacks; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** Entry point to PaloAltoNetworksNgfwManager. */ +public final class PaloAltoNetworksNgfwManager { + private GlobalRulestacks globalRulestacks; + + private CertificateObjectGlobalRulestacks certificateObjectGlobalRulestacks; + + private FqdnListGlobalRulestacks fqdnListGlobalRulestacks; + + private PostRules postRules; + + private PrefixListGlobalRulestacks prefixListGlobalRulestacks; + + private PreRules preRules; + + private Operations operations; + + private Firewalls firewalls; + + private LocalRulestacks localRulestacks; + + private FirewallStatus firewallStatus; + + private CertificateObjectLocalRulestacks certificateObjectLocalRulestacks; + + private FqdnListLocalRulestacks fqdnListLocalRulestacks; + + private LocalRules localRules; + + private PrefixListLocalRulestacks prefixListLocalRulestacks; + + private final PaloAltoNetworksCloudngfw clientObject; + + private PaloAltoNetworksNgfwManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = + new PaloAltoNetworksCloudngfwBuilder() + .pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); + } + + /** + * Creates an instance of PaloAlto Networks Ngfw service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the PaloAlto Networks Ngfw service API instance. + */ + public static PaloAltoNetworksNgfwManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * Creates an instance of PaloAlto Networks Ngfw service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the PaloAlto Networks Ngfw service API instance. + */ + public static PaloAltoNetworksNgfwManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new PaloAltoNetworksNgfwManager(httpPipeline, profile, null); + } + + /** + * Gets a Configurable instance that can be used to create PaloAltoNetworksNgfwManager with optional configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new PaloAltoNetworksNgfwManager.Configurable(); + } + + /** The Configurable allowing configurations to be set. */ + public static final class Configurable { + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of PaloAlto Networks Ngfw service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the PaloAlto Networks Ngfw service API instance. + */ + public PaloAltoNetworksNgfwManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder + .append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.paloaltonetworks") + .append("/") + .append("1.0.0-beta.1"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder + .append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); + policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = + new HttpPipelineBuilder() + .httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); + return new PaloAltoNetworksNgfwManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** + * Gets the resource collection API of GlobalRulestacks. + * + * @return Resource collection API of GlobalRulestacks. + */ + public GlobalRulestacks globalRulestacks() { + if (this.globalRulestacks == null) { + this.globalRulestacks = new GlobalRulestacksImpl(clientObject.getGlobalRulestacks(), this); + } + return globalRulestacks; + } + + /** + * Gets the resource collection API of CertificateObjectGlobalRulestacks. + * + * @return Resource collection API of CertificateObjectGlobalRulestacks. + */ + public CertificateObjectGlobalRulestacks certificateObjectGlobalRulestacks() { + if (this.certificateObjectGlobalRulestacks == null) { + this.certificateObjectGlobalRulestacks = + new CertificateObjectGlobalRulestacksImpl(clientObject.getCertificateObjectGlobalRulestacks(), this); + } + return certificateObjectGlobalRulestacks; + } + + /** + * Gets the resource collection API of FqdnListGlobalRulestacks. + * + * @return Resource collection API of FqdnListGlobalRulestacks. + */ + public FqdnListGlobalRulestacks fqdnListGlobalRulestacks() { + if (this.fqdnListGlobalRulestacks == null) { + this.fqdnListGlobalRulestacks = + new FqdnListGlobalRulestacksImpl(clientObject.getFqdnListGlobalRulestacks(), this); + } + return fqdnListGlobalRulestacks; + } + + /** + * Gets the resource collection API of PostRules. + * + * @return Resource collection API of PostRules. + */ + public PostRules postRules() { + if (this.postRules == null) { + this.postRules = new PostRulesImpl(clientObject.getPostRules(), this); + } + return postRules; + } + + /** + * Gets the resource collection API of PrefixListGlobalRulestacks. + * + * @return Resource collection API of PrefixListGlobalRulestacks. + */ + public PrefixListGlobalRulestacks prefixListGlobalRulestacks() { + if (this.prefixListGlobalRulestacks == null) { + this.prefixListGlobalRulestacks = + new PrefixListGlobalRulestacksImpl(clientObject.getPrefixListGlobalRulestacks(), this); + } + return prefixListGlobalRulestacks; + } + + /** + * Gets the resource collection API of PreRules. + * + * @return Resource collection API of PreRules. + */ + public PreRules preRules() { + if (this.preRules == null) { + this.preRules = new PreRulesImpl(clientObject.getPreRules(), this); + } + return preRules; + } + + /** + * 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 Firewalls. It manages FirewallResource. + * + * @return Resource collection API of Firewalls. + */ + public Firewalls firewalls() { + if (this.firewalls == null) { + this.firewalls = new FirewallsImpl(clientObject.getFirewalls(), this); + } + return firewalls; + } + + /** + * Gets the resource collection API of LocalRulestacks. It manages LocalRulestackResource. + * + * @return Resource collection API of LocalRulestacks. + */ + public LocalRulestacks localRulestacks() { + if (this.localRulestacks == null) { + this.localRulestacks = new LocalRulestacksImpl(clientObject.getLocalRulestacks(), this); + } + return localRulestacks; + } + + /** + * Gets the resource collection API of FirewallStatus. + * + * @return Resource collection API of FirewallStatus. + */ + public FirewallStatus firewallStatus() { + if (this.firewallStatus == null) { + this.firewallStatus = new FirewallStatusImpl(clientObject.getFirewallStatus(), this); + } + return firewallStatus; + } + + /** + * Gets the resource collection API of CertificateObjectLocalRulestacks. It manages + * CertificateObjectLocalRulestackResource. + * + * @return Resource collection API of CertificateObjectLocalRulestacks. + */ + public CertificateObjectLocalRulestacks certificateObjectLocalRulestacks() { + if (this.certificateObjectLocalRulestacks == null) { + this.certificateObjectLocalRulestacks = + new CertificateObjectLocalRulestacksImpl(clientObject.getCertificateObjectLocalRulestacks(), this); + } + return certificateObjectLocalRulestacks; + } + + /** + * Gets the resource collection API of FqdnListLocalRulestacks. It manages FqdnListLocalRulestackResource. + * + * @return Resource collection API of FqdnListLocalRulestacks. + */ + public FqdnListLocalRulestacks fqdnListLocalRulestacks() { + if (this.fqdnListLocalRulestacks == null) { + this.fqdnListLocalRulestacks = + new FqdnListLocalRulestacksImpl(clientObject.getFqdnListLocalRulestacks(), this); + } + return fqdnListLocalRulestacks; + } + + /** + * Gets the resource collection API of LocalRules. It manages LocalRulesResource. + * + * @return Resource collection API of LocalRules. + */ + public LocalRules localRules() { + if (this.localRules == null) { + this.localRules = new LocalRulesImpl(clientObject.getLocalRules(), this); + } + return localRules; + } + + /** + * Gets the resource collection API of PrefixListLocalRulestacks. It manages PrefixListResource. + * + * @return Resource collection API of PrefixListLocalRulestacks. + */ + public PrefixListLocalRulestacks prefixListLocalRulestacks() { + if (this.prefixListLocalRulestacks == null) { + this.prefixListLocalRulestacks = + new PrefixListLocalRulestacksImpl(clientObject.getPrefixListLocalRulestacks(), this); + } + return prefixListLocalRulestacks; + } + + /** + * @return Wrapped service client PaloAltoNetworksCloudngfw providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. + */ + public PaloAltoNetworksCloudngfw serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/CertificateObjectGlobalRulestacksClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/CertificateObjectGlobalRulestacksClient.java new file mode 100644 index 000000000000..7a20a4880ad5 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/CertificateObjectGlobalRulestacksClient.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.models.CertificateObjectGlobalRulestackResourceInner; + +/** + * An instance of this class provides access to all the operations defined in CertificateObjectGlobalRulestacksClient. + */ +public interface CertificateObjectGlobalRulestacksClient { + /** + * List CertificateObjectGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 CertificateObjectGlobalRulestackResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String globalRulestackName); + + /** + * List CertificateObjectGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 CertificateObjectGlobalRulestackResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String globalRulestackName, Context context); + + /** + * Get a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @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 CertificateObjectGlobalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String globalRulestackName, String name, Context context); + + /** + * Get a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 CertificateObjectGlobalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CertificateObjectGlobalRulestackResourceInner get(String globalRulestackName, String name); + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CertificateObjectGlobalRulestackResourceInner> + beginCreateOrUpdate( + String globalRulestackName, String name, CertificateObjectGlobalRulestackResourceInner resource); + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CertificateObjectGlobalRulestackResourceInner> + beginCreateOrUpdate( + String globalRulestackName, + String name, + CertificateObjectGlobalRulestackResourceInner resource, + Context context); + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CertificateObjectGlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, String name, CertificateObjectGlobalRulestackResourceInner resource); + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CertificateObjectGlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, + String name, + CertificateObjectGlobalRulestackResourceInner resource, + Context context); + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 globalRulestackName, String name); + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @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 globalRulestackName, String name, Context context); + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 globalRulestackName, String name); + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @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 globalRulestackName, String name, Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/CertificateObjectLocalRulestacksClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/CertificateObjectLocalRulestacksClient.java new file mode 100644 index 000000000000..0c1a89d98880 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/CertificateObjectLocalRulestacksClient.java @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.models.CertificateObjectLocalRulestackResourceInner; + +/** + * An instance of this class provides access to all the operations defined in CertificateObjectLocalRulestacksClient. + */ +public interface CertificateObjectLocalRulestacksClient { + /** + * List CertificateObjectLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 CertificateObjectLocalRulestackResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName); + + /** + * List CertificateObjectLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 CertificateObjectLocalRulestackResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context); + + /** + * Get a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @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 CertificateObjectLocalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String localRulestackName, String name, Context context); + + /** + * Get a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 CertificateObjectLocalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CertificateObjectLocalRulestackResourceInner get(String resourceGroupName, String localRulestackName, String name); + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CertificateObjectLocalRulestackResourceInner> + beginCreateOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource); + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CertificateObjectLocalRulestackResourceInner> + beginCreateOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource, + Context context); + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CertificateObjectLocalRulestackResourceInner createOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource); + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CertificateObjectLocalRulestackResourceInner createOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource, + Context context); + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 localRulestackName, String name); + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @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 localRulestackName, String name, Context context); + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 localRulestackName, String name); + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @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 localRulestackName, String name, Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FirewallStatusClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FirewallStatusClient.java new file mode 100644 index 000000000000..75f4ffa2cde3 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FirewallStatusClient.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FirewallStatusResourceInner; + +/** An instance of this class provides access to all the operations defined in FirewallStatusClient. */ +public interface FirewallStatusClient { + /** + * List FirewallStatusResource resources by Firewalls. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 FirewallStatusResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirewalls(String resourceGroupName, String firewallName); + + /** + * List FirewallStatusResource resources by Firewalls. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 FirewallStatusResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirewalls( + String resourceGroupName, String firewallName, Context context); + + /** + * Get a FirewallStatusResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 FirewallStatusResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String firewallName, Context context); + + /** + * Get a FirewallStatusResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 FirewallStatusResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FirewallStatusResourceInner get(String resourceGroupName, String firewallName); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FirewallsClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FirewallsClient.java new file mode 100644 index 000000000000..72f6d89d6d12 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FirewallsClient.java @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.models.FirewallResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackInfoInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LogSettingsInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SupportInfoInner; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallResourceUpdate; + +/** An instance of this class provides access to all the operations defined in FirewallsClient. */ +public interface FirewallsClient { + /** + * List FirewallResource resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown 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 FirewallResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List FirewallResource resources by subscription 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 response of a FirewallResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List FirewallResource resources by 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 FirewallResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List FirewallResource resources by 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 FirewallResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 FirewallResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String firewallName, Context context); + + /** + * Get a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 FirewallResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FirewallResourceInner getByResourceGroup(String resourceGroupName, String firewallName); + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FirewallResourceInner> beginCreateOrUpdate( + String resourceGroupName, String firewallName, FirewallResourceInner resource); + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FirewallResourceInner> beginCreateOrUpdate( + String resourceGroupName, String firewallName, FirewallResourceInner resource, Context context); + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FirewallResourceInner createOrUpdate(String resourceGroupName, String firewallName, FirewallResourceInner resource); + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FirewallResourceInner createOrUpdate( + String resourceGroupName, String firewallName, FirewallResourceInner resource, Context context); + + /** + * Update a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param properties 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 paloAltoNetworks Firewall along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String firewallName, FirewallResourceUpdate properties, Context context); + + /** + * Update a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param properties 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 paloAltoNetworks Firewall. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FirewallResourceInner update(String resourceGroupName, String firewallName, FirewallResourceUpdate properties); + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 firewallName); + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 firewallName, Context context); + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 firewallName); + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 firewallName, Context context); + + /** + * Get Global Rulestack associated with the Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 global Rulestack associated with the Firewall along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getGlobalRulestackWithResponse( + String resourceGroupName, String firewallName, Context context); + + /** + * Get Global Rulestack associated with the Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return global Rulestack associated with the Firewall. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GlobalRulestackInfoInner getGlobalRulestack(String resourceGroupName, String firewallName); + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 log Settings for Firewall along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getLogProfileWithResponse( + String resourceGroupName, String firewallName, Context context); + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return log Settings for Firewall. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogSettingsInner getLogProfile(String resourceGroupName, String firewallName); + + /** + * support info for firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param email email address on behalf of which this API called. + * @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 support information for the resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSupportInfoWithResponse( + String resourceGroupName, String firewallName, String email, Context context); + + /** + * support info for firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SupportInfoInner getSupportInfo(String resourceGroupName, String firewallName); + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param logSettings Log Settings for Firewall. + * @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 Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response saveLogProfileWithResponse( + String resourceGroupName, String firewallName, LogSettingsInner logSettings, Context context); + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 saveLogProfile(String resourceGroupName, String firewallName); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FqdnListGlobalRulestacksClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FqdnListGlobalRulestacksClient.java new file mode 100644 index 000000000000..ff0a78211029 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FqdnListGlobalRulestacksClient.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.models.FqdnListGlobalRulestackResourceInner; + +/** An instance of this class provides access to all the operations defined in FqdnListGlobalRulestacksClient. */ +public interface FqdnListGlobalRulestacksClient { + /** + * List FqdnListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 FqdnListGlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String globalRulestackName); + + /** + * List FqdnListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 FqdnListGlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String globalRulestackName, Context context); + + /** + * Get a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @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 FqdnListGlobalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String globalRulestackName, String name, Context context); + + /** + * Get a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 FqdnListGlobalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FqdnListGlobalRulestackResourceInner get(String globalRulestackName, String name); + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FqdnListGlobalRulestackResourceInner> + beginCreateOrUpdate(String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource); + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FqdnListGlobalRulestackResourceInner> + beginCreateOrUpdate( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource, Context context); + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FqdnListGlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource); + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FqdnListGlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource, Context context); + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 globalRulestackName, String name); + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @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 globalRulestackName, String name, Context context); + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 globalRulestackName, String name); + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @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 globalRulestackName, String name, Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FqdnListLocalRulestacksClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FqdnListLocalRulestacksClient.java new file mode 100644 index 000000000000..f273e598dba2 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/FqdnListLocalRulestacksClient.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.models.FqdnListLocalRulestackResourceInner; + +/** An instance of this class provides access to all the operations defined in FqdnListLocalRulestacksClient. */ +public interface FqdnListLocalRulestacksClient { + /** + * List FqdnListLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 FqdnListLocalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName); + + /** + * List FqdnListLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 FqdnListLocalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context); + + /** + * Get a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @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 FqdnListLocalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String localRulestackName, String name, Context context); + + /** + * Get a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 FqdnListLocalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FqdnListLocalRulestackResourceInner get(String resourceGroupName, String localRulestackName, String name); + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FqdnListLocalRulestackResourceInner> + beginCreateOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource); + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FqdnListLocalRulestackResourceInner> + beginCreateOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource, + Context context); + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FqdnListLocalRulestackResourceInner createOrUpdate( + String resourceGroupName, String localRulestackName, String name, FqdnListLocalRulestackResourceInner resource); + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FqdnListLocalRulestackResourceInner createOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource, + Context context); + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 localRulestackName, String name); + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @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 localRulestackName, String name, Context context); + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 localRulestackName, String name); + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @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 localRulestackName, String name, Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/GlobalRulestacksClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/GlobalRulestacksClient.java new file mode 100644 index 000000000000..29307665df87 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/GlobalRulestacksClient.java @@ -0,0 +1,478 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.models.AdvSecurityObjectListResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ChangelogInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CountriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListAppIdResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListFirewallsResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PredefinedUrlCategoriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SecurityServicesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackResourceUpdate; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesTypeEnum; + +/** An instance of this class provides access to all the operations defined in GlobalRulestacksClient. */ +public interface GlobalRulestacksClient { + /** + * List GlobalRulestackResource resources by Tenant. + * + * @throws com.azure.core.management.exception.ManagementException thrown 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 GlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List GlobalRulestackResource resources by Tenant. + * + * @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 GlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Get a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 GlobalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String globalRulestackName, Context context); + + /** + * Get a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 GlobalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GlobalRulestackResourceInner get(String globalRulestackName); + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GlobalRulestackResourceInner> beginCreateOrUpdate( + String globalRulestackName, GlobalRulestackResourceInner resource); + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GlobalRulestackResourceInner> beginCreateOrUpdate( + String globalRulestackName, GlobalRulestackResourceInner resource, Context context); + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GlobalRulestackResourceInner createOrUpdate(String globalRulestackName, GlobalRulestackResourceInner resource); + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, GlobalRulestackResourceInner resource, Context context); + + /** + * Update a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param properties 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 paloAltoNetworks GlobalRulestack along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String globalRulestackName, GlobalRulestackResourceUpdate properties, Context context); + + /** + * Update a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param properties 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 paloAltoNetworks GlobalRulestack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GlobalRulestackResourceInner update(String globalRulestackName, GlobalRulestackResourceUpdate properties); + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 globalRulestackName); + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 globalRulestackName, Context context); + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 globalRulestackName); + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 globalRulestackName, Context context); + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginCommit(String globalRulestackName); + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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> beginCommit(String globalRulestackName, Context context); + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 commit(String globalRulestackName); + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 commit(String globalRulestackName, Context context); + + /** + * Get changelog. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 changelog along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getChangeLogWithResponse(String globalRulestackName, Context context); + + /** + * Get changelog. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChangelogInner getChangeLog(String globalRulestackName); + + /** + * Get the list of advanced security objects. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 list of advanced security objects along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listAdvancedSecurityObjectsWithResponse( + String globalRulestackName, AdvSecurityObjectTypeEnum type, String skip, Integer top, Context context); + + /** + * Get the list of advanced security objects. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AdvSecurityObjectListResponseInner listAdvancedSecurityObjects( + String globalRulestackName, AdvSecurityObjectTypeEnum type); + + /** + * List of AppIds for GlobalRulestack ApiVersion. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param appIdVersion The appIdVersion parameter. + * @param appPrefix The appPrefix parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listAppIdsWithResponse( + String globalRulestackName, String appIdVersion, String appPrefix, String skip, Integer top, Context context); + + /** + * List of AppIds for GlobalRulestack ApiVersion. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + ListAppIdResponseInner listAppIds(String globalRulestackName); + + /** + * List of countries for Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 countries Response Object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listCountriesWithResponse( + String globalRulestackName, String skip, Integer top, Context context); + + /** + * List of countries for Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CountriesResponseInner listCountries(String globalRulestackName); + + /** + * List of Firewalls associated with Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 firewalls response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listFirewallsWithResponse(String globalRulestackName, Context context); + + /** + * List of Firewalls associated with Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ListFirewallsResponseInner listFirewalls(String globalRulestackName); + + /** + * List predefined URL categories for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 predefined url categories response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listPredefinedUrlCategoriesWithResponse( + String globalRulestackName, String skip, Integer top, Context context); + + /** + * List predefined URL categories for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PredefinedUrlCategoriesResponseInner listPredefinedUrlCategories(String globalRulestackName); + + /** + * List the security services for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 security services list response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSecurityServicesWithResponse( + String globalRulestackName, SecurityServicesTypeEnum type, String skip, Integer top, Context context); + + /** + * List the security services for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SecurityServicesResponseInner listSecurityServices(String globalRulestackName, SecurityServicesTypeEnum type); + + /** + * Revert rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response revertWithResponse(String globalRulestackName, Context context); + + /** + * Revert rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 revert(String globalRulestackName); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/LocalRulesClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/LocalRulesClient.java new file mode 100644 index 000000000000..7db273703930 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/LocalRulesClient.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.models.LocalRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterResetInner; + +/** An instance of this class provides access to all the operations defined in LocalRulesClient. */ +public interface LocalRulesClient { + /** + * List LocalRulesResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 LocalRulesResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocalRulestacks(String resourceGroupName, String localRulestackName); + + /** + * List LocalRulesResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 LocalRulesResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context); + + /** + * Get a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @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 LocalRulesResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String localRulestackName, String priority, Context context); + + /** + * Get a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 LocalRulesResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LocalRulesResourceInner get(String resourceGroupName, String localRulestackName, String priority); + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LocalRulesResourceInner> beginCreateOrUpdate( + String resourceGroupName, String localRulestackName, String priority, LocalRulesResourceInner resource); + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LocalRulesResourceInner> beginCreateOrUpdate( + String resourceGroupName, + String localRulestackName, + String priority, + LocalRulesResourceInner resource, + Context context); + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LocalRulesResourceInner createOrUpdate( + String resourceGroupName, String localRulestackName, String priority, LocalRulesResourceInner resource); + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LocalRulesResourceInner createOrUpdate( + String resourceGroupName, + String localRulestackName, + String priority, + LocalRulesResourceInner resource, + Context context); + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 localRulestackName, String priority); + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @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 localRulestackName, String priority, Context context); + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 localRulestackName, String priority); + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @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 localRulestackName, String priority, Context context); + + /** + * Get counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @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 counters along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getCountersWithResponse( + String resourceGroupName, String localRulestackName, String priority, String firewallName, Context context); + + /** + * Get counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RuleCounterInner getCounters(String resourceGroupName, String localRulestackName, String priority); + + /** + * Refresh counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @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 Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response refreshCountersWithResponse( + String resourceGroupName, String localRulestackName, String priority, String firewallName, Context context); + + /** + * Refresh counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 refreshCounters(String resourceGroupName, String localRulestackName, String priority); + + /** + * Reset counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @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 rule counter reset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response resetCountersWithResponse( + String resourceGroupName, String localRulestackName, String priority, String firewallName, Context context); + + /** + * Reset counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RuleCounterResetInner resetCounters(String resourceGroupName, String localRulestackName, String priority); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/LocalRulestacksClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/LocalRulestacksClient.java new file mode 100644 index 000000000000..4819adab86ba --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/LocalRulestacksClient.java @@ -0,0 +1,588 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.models.AdvSecurityObjectListResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ChangelogInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CountriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListAppIdResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListFirewallsResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LocalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PredefinedUrlCategoriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SecurityServicesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SupportInfoInner; +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestackResourceUpdate; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesTypeEnum; + +/** An instance of this class provides access to all the operations defined in LocalRulestacksClient. */ +public interface LocalRulestacksClient { + /** + * List LocalRulestackResource resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown 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 LocalRulestackResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List LocalRulestackResource resources by subscription 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 response of a LocalRulestackResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List LocalRulestackResource resources by 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 LocalRulestackResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List LocalRulestackResource resources by 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 LocalRulestackResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 LocalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String localRulestackName, Context context); + + /** + * Get a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 LocalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LocalRulestackResourceInner getByResourceGroup(String resourceGroupName, String localRulestackName); + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LocalRulestackResourceInner> beginCreateOrUpdate( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource); + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LocalRulestackResourceInner> beginCreateOrUpdate( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource, Context context); + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LocalRulestackResourceInner createOrUpdate( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource); + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LocalRulestackResourceInner createOrUpdate( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource, Context context); + + /** + * Update a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param properties 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 paloAltoNetworks LocalRulestack along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String localRulestackName, LocalRulestackResourceUpdate properties, Context context); + + /** + * Update a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param properties 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 paloAltoNetworks LocalRulestack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LocalRulestackResourceInner update( + String resourceGroupName, String localRulestackName, LocalRulestackResourceUpdate properties); + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 localRulestackName); + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 localRulestackName, Context context); + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 localRulestackName); + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 localRulestackName, Context context); + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginCommit(String resourceGroupName, String localRulestackName); + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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> beginCommit( + String resourceGroupName, String localRulestackName, Context context); + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 commit(String resourceGroupName, String localRulestackName); + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 commit(String resourceGroupName, String localRulestackName, Context context); + + /** + * Get changelog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 changelog along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getChangeLogWithResponse( + String resourceGroupName, String localRulestackName, Context context); + + /** + * Get changelog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChangelogInner getChangeLog(String resourceGroupName, String localRulestackName); + + /** + * support info for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param email email address on behalf of which this API called. + * @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 support information for the resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSupportInfoWithResponse( + String resourceGroupName, String localRulestackName, String email, Context context); + + /** + * support info for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SupportInfoInner getSupportInfo(String resourceGroupName, String localRulestackName); + + /** + * Get the list of advanced security objects. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 list of advanced security objects along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listAdvancedSecurityObjectsWithResponse( + String resourceGroupName, + String localRulestackName, + AdvSecurityObjectTypeEnum type, + String skip, + Integer top, + Context context); + + /** + * Get the list of advanced security objects. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AdvSecurityObjectListResponseInner listAdvancedSecurityObjects( + String resourceGroupName, String localRulestackName, AdvSecurityObjectTypeEnum type); + + /** + * List of AppIds for LocalRulestack ApiVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param appIdVersion The appIdVersion parameter. + * @param appPrefix The appPrefix parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listAppIdsWithResponse( + String resourceGroupName, + String localRulestackName, + String appIdVersion, + String appPrefix, + String skip, + Integer top, + Context context); + + /** + * List of AppIds for LocalRulestack ApiVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + ListAppIdResponseInner listAppIds(String resourceGroupName, String localRulestackName); + + /** + * List of countries for Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 countries Response Object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listCountriesWithResponse( + String resourceGroupName, String localRulestackName, String skip, Integer top, Context context); + + /** + * List of countries for Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CountriesResponseInner listCountries(String resourceGroupName, String localRulestackName); + + /** + * List of Firewalls associated with Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 firewalls response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listFirewallsWithResponse( + String resourceGroupName, String localRulestackName, Context context); + + /** + * List of Firewalls associated with Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ListFirewallsResponseInner listFirewalls(String resourceGroupName, String localRulestackName); + + /** + * List predefined URL categories for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 predefined url categories response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listPredefinedUrlCategoriesWithResponse( + String resourceGroupName, String localRulestackName, String skip, Integer top, Context context); + + /** + * List predefined URL categories for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PredefinedUrlCategoriesResponseInner listPredefinedUrlCategories( + String resourceGroupName, String localRulestackName); + + /** + * List the security services for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 security services list response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSecurityServicesWithResponse( + String resourceGroupName, + String localRulestackName, + SecurityServicesTypeEnum type, + String skip, + Integer top, + Context context); + + /** + * List the security services for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SecurityServicesResponseInner listSecurityServices( + String resourceGroupName, String localRulestackName, SecurityServicesTypeEnum type); + + /** + * Revert rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response revertWithResponse(String resourceGroupName, String localRulestackName, Context context); + + /** + * Revert rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 revert(String resourceGroupName, String localRulestackName); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/OperationsClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/OperationsClient.java new file mode 100644 index 000000000000..63eb58a0ec20 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/OperationsClient.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.OperationInner; + +/** An instance of this class provides access to all the operations defined in OperationsClient. */ +public interface OperationsClient { + /** + * 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. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PaloAltoNetworksCloudngfw.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PaloAltoNetworksCloudngfw.java new file mode 100644 index 000000000000..2f224e627a1f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PaloAltoNetworksCloudngfw.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** The interface for PaloAltoNetworksCloudngfw class. */ +public interface PaloAltoNetworksCloudngfw { + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the GlobalRulestacksClient object to access its operations. + * + * @return the GlobalRulestacksClient object. + */ + GlobalRulestacksClient getGlobalRulestacks(); + + /** + * Gets the CertificateObjectGlobalRulestacksClient object to access its operations. + * + * @return the CertificateObjectGlobalRulestacksClient object. + */ + CertificateObjectGlobalRulestacksClient getCertificateObjectGlobalRulestacks(); + + /** + * Gets the FqdnListGlobalRulestacksClient object to access its operations. + * + * @return the FqdnListGlobalRulestacksClient object. + */ + FqdnListGlobalRulestacksClient getFqdnListGlobalRulestacks(); + + /** + * Gets the PostRulesClient object to access its operations. + * + * @return the PostRulesClient object. + */ + PostRulesClient getPostRules(); + + /** + * Gets the PrefixListGlobalRulestacksClient object to access its operations. + * + * @return the PrefixListGlobalRulestacksClient object. + */ + PrefixListGlobalRulestacksClient getPrefixListGlobalRulestacks(); + + /** + * Gets the PreRulesClient object to access its operations. + * + * @return the PreRulesClient object. + */ + PreRulesClient getPreRules(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the FirewallsClient object to access its operations. + * + * @return the FirewallsClient object. + */ + FirewallsClient getFirewalls(); + + /** + * Gets the LocalRulestacksClient object to access its operations. + * + * @return the LocalRulestacksClient object. + */ + LocalRulestacksClient getLocalRulestacks(); + + /** + * Gets the FirewallStatusClient object to access its operations. + * + * @return the FirewallStatusClient object. + */ + FirewallStatusClient getFirewallStatus(); + + /** + * Gets the CertificateObjectLocalRulestacksClient object to access its operations. + * + * @return the CertificateObjectLocalRulestacksClient object. + */ + CertificateObjectLocalRulestacksClient getCertificateObjectLocalRulestacks(); + + /** + * Gets the FqdnListLocalRulestacksClient object to access its operations. + * + * @return the FqdnListLocalRulestacksClient object. + */ + FqdnListLocalRulestacksClient getFqdnListLocalRulestacks(); + + /** + * Gets the LocalRulesClient object to access its operations. + * + * @return the LocalRulesClient object. + */ + LocalRulesClient getLocalRules(); + + /** + * Gets the PrefixListLocalRulestacksClient object to access its operations. + * + * @return the PrefixListLocalRulestacksClient object. + */ + PrefixListLocalRulestacksClient getPrefixListLocalRulestacks(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PostRulesClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PostRulesClient.java new file mode 100644 index 000000000000..337183e04a9c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PostRulesClient.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.models.PostRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterResetInner; + +/** An instance of this class provides access to all the operations defined in PostRulesClient. */ +public interface PostRulesClient { + /** + * List PostRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 PostRulesResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String globalRulestackName); + + /** + * List PostRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 PostRulesResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String globalRulestackName, Context context); + + /** + * Get a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @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 PostRulesResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String globalRulestackName, String priority, Context context); + + /** + * Get a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 PostRulesResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PostRulesResourceInner get(String globalRulestackName, String priority); + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PostRulesResourceInner> beginCreateOrUpdate( + String globalRulestackName, String priority, PostRulesResourceInner resource); + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PostRulesResourceInner> beginCreateOrUpdate( + String globalRulestackName, String priority, PostRulesResourceInner resource, Context context); + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PostRulesResourceInner createOrUpdate(String globalRulestackName, String priority, PostRulesResourceInner resource); + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PostRulesResourceInner createOrUpdate( + String globalRulestackName, String priority, PostRulesResourceInner resource, Context context); + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 globalRulestackName, String priority); + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @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 globalRulestackName, String priority, Context context); + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 globalRulestackName, String priority); + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @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 globalRulestackName, String priority, Context context); + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @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 counters along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context); + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RuleCounterInner getCounters(String globalRulestackName, String priority); + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @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 Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response refreshCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context); + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 refreshCounters(String globalRulestackName, String priority); + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @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 rule counter reset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response resetCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context); + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RuleCounterResetInner resetCounters(String globalRulestackName, String priority); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PreRulesClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PreRulesClient.java new file mode 100644 index 000000000000..1b05d49392a1 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PreRulesClient.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.models.PreRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterResetInner; + +/** An instance of this class provides access to all the operations defined in PreRulesClient. */ +public interface PreRulesClient { + /** + * List PreRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 PreRulesResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String globalRulestackName); + + /** + * List PreRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 PreRulesResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String globalRulestackName, Context context); + + /** + * Get a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @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 PreRulesResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String globalRulestackName, String priority, Context context); + + /** + * Get a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 PreRulesResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PreRulesResourceInner get(String globalRulestackName, String priority); + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PreRulesResourceInner> beginCreateOrUpdate( + String globalRulestackName, String priority, PreRulesResourceInner resource); + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PreRulesResourceInner> beginCreateOrUpdate( + String globalRulestackName, String priority, PreRulesResourceInner resource, Context context); + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PreRulesResourceInner createOrUpdate(String globalRulestackName, String priority, PreRulesResourceInner resource); + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PreRulesResourceInner createOrUpdate( + String globalRulestackName, String priority, PreRulesResourceInner resource, Context context); + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 globalRulestackName, String priority); + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @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 globalRulestackName, String priority, Context context); + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 globalRulestackName, String priority); + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @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 globalRulestackName, String priority, Context context); + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @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 counters along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context); + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RuleCounterInner getCounters(String globalRulestackName, String priority); + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @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 Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response refreshCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context); + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 refreshCounters(String globalRulestackName, String priority); + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @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 rule counter reset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response resetCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context); + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RuleCounterResetInner resetCounters(String globalRulestackName, String priority); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PrefixListGlobalRulestacksClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PrefixListGlobalRulestacksClient.java new file mode 100644 index 000000000000..22e4b449bff3 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PrefixListGlobalRulestacksClient.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.models.PrefixListGlobalRulestackResourceInner; + +/** An instance of this class provides access to all the operations defined in PrefixListGlobalRulestacksClient. */ +public interface PrefixListGlobalRulestacksClient { + /** + * List PrefixListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 PrefixListGlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String globalRulestackName); + + /** + * List PrefixListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 PrefixListGlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String globalRulestackName, Context context); + + /** + * Get a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @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 PrefixListGlobalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String globalRulestackName, String name, Context context); + + /** + * Get a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 PrefixListGlobalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrefixListGlobalRulestackResourceInner get(String globalRulestackName, String name); + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrefixListGlobalRulestackResourceInner> + beginCreateOrUpdate(String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource); + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrefixListGlobalRulestackResourceInner> + beginCreateOrUpdate( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource, Context context); + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrefixListGlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource); + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrefixListGlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource, Context context); + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 globalRulestackName, String name); + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @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 globalRulestackName, String name, Context context); + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 globalRulestackName, String name); + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @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 globalRulestackName, String name, Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PrefixListLocalRulestacksClient.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PrefixListLocalRulestacksClient.java new file mode 100644 index 000000000000..493d7136d40c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/PrefixListLocalRulestacksClient.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.models.PrefixListResourceInner; + +/** An instance of this class provides access to all the operations defined in PrefixListLocalRulestacksClient. */ +public interface PrefixListLocalRulestacksClient { + /** + * List PrefixListResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 PrefixListResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocalRulestacks(String resourceGroupName, String localRulestackName); + + /** + * List PrefixListResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 PrefixListResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context); + + /** + * Get a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @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 PrefixListResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String localRulestackName, String name, Context context); + + /** + * Get a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 PrefixListResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrefixListResourceInner get(String resourceGroupName, String localRulestackName, String name); + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrefixListResourceInner> beginCreateOrUpdate( + String resourceGroupName, String localRulestackName, String name, PrefixListResourceInner resource); + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrefixListResourceInner> beginCreateOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + PrefixListResourceInner resource, + Context context); + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrefixListResourceInner createOrUpdate( + String resourceGroupName, String localRulestackName, String name, PrefixListResourceInner resource); + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrefixListResourceInner createOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + PrefixListResourceInner resource, + Context context); + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 localRulestackName, String name); + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @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 localRulestackName, String name, Context context); + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 localRulestackName, String name); + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @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 localRulestackName, String name, Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/AdvSecurityObjectListResponseInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/AdvSecurityObjectListResponseInner.java new file mode 100644 index 000000000000..c704b17c275b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/AdvSecurityObjectListResponseInner.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectModel; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** advanced security object. */ +@Fluent +public final class AdvSecurityObjectListResponseInner { + /* + * response value + */ + @JsonProperty(value = "value", required = true) + private AdvSecurityObjectModel value; + + /* + * next link + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of AdvSecurityObjectListResponseInner class. */ + public AdvSecurityObjectListResponseInner() { + } + + /** + * Get the value property: response value. + * + * @return the value value. + */ + public AdvSecurityObjectModel value() { + return this.value; + } + + /** + * Set the value property: response value. + * + * @param value the value value to set. + * @return the AdvSecurityObjectListResponseInner object itself. + */ + public AdvSecurityObjectListResponseInner withValue(AdvSecurityObjectModel value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: next link. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: next link. + * + * @param nextLink the nextLink value to set. + * @return the AdvSecurityObjectListResponseInner object itself. + */ + public AdvSecurityObjectListResponseInner 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model AdvSecurityObjectListResponseInner")); + } else { + value().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AdvSecurityObjectListResponseInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CertificateObject.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CertificateObject.java new file mode 100644 index 000000000000..750d928f36a3 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CertificateObject.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** certificate used for inbound and outbound decryption. */ +@Fluent +public final class CertificateObject { + /* + * Resource Id of certificate signer, to be populated only when certificateSelfSigned is false + */ + @JsonProperty(value = "certificateSignerResourceId") + private String certificateSignerResourceId; + + /* + * use certificate self signed + */ + @JsonProperty(value = "certificateSelfSigned", required = true) + private BooleanEnum certificateSelfSigned; + + /* + * comment for this object + */ + @JsonProperty(value = "auditComment") + private String auditComment; + + /* + * user description for this object + */ + @JsonProperty(value = "description") + private String description; + + /* + * read only string representing last create or update + */ + @JsonProperty(value = "etag") + private String etag; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** Creates an instance of CertificateObject class. */ + public CertificateObject() { + } + + /** + * Get the certificateSignerResourceId property: Resource Id of certificate signer, to be populated only when + * certificateSelfSigned is false. + * + * @return the certificateSignerResourceId value. + */ + public String certificateSignerResourceId() { + return this.certificateSignerResourceId; + } + + /** + * Set the certificateSignerResourceId property: Resource Id of certificate signer, to be populated only when + * certificateSelfSigned is false. + * + * @param certificateSignerResourceId the certificateSignerResourceId value to set. + * @return the CertificateObject object itself. + */ + public CertificateObject withCertificateSignerResourceId(String certificateSignerResourceId) { + this.certificateSignerResourceId = certificateSignerResourceId; + return this; + } + + /** + * Get the certificateSelfSigned property: use certificate self signed. + * + * @return the certificateSelfSigned value. + */ + public BooleanEnum certificateSelfSigned() { + return this.certificateSelfSigned; + } + + /** + * Set the certificateSelfSigned property: use certificate self signed. + * + * @param certificateSelfSigned the certificateSelfSigned value to set. + * @return the CertificateObject object itself. + */ + public CertificateObject withCertificateSelfSigned(BooleanEnum certificateSelfSigned) { + this.certificateSelfSigned = certificateSelfSigned; + return this; + } + + /** + * Get the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.auditComment; + } + + /** + * Set the auditComment property: comment for this object. + * + * @param auditComment the auditComment value to set. + * @return the CertificateObject object itself. + */ + public CertificateObject withAuditComment(String auditComment) { + this.auditComment = auditComment; + return this; + } + + /** + * Get the description property: user description for this object. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: user description for this object. + * + * @param description the description value to set. + * @return the CertificateObject object itself. + */ + public CertificateObject withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the etag property: read only string representing last create or update. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Set the etag property: read only string representing last create or update. + * + * @param etag the etag value to set. + * @return the CertificateObject object itself. + */ + public CertificateObject withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (certificateSelfSigned() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property certificateSelfSigned in model CertificateObject")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CertificateObject.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CertificateObjectGlobalRulestackResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CertificateObjectGlobalRulestackResourceInner.java new file mode 100644 index 000000000000..f92fa46c29c9 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CertificateObjectGlobalRulestackResourceInner.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** GlobalRulestack Certificate Object. */ +@Fluent +public final class CertificateObjectGlobalRulestackResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private CertificateObject innerProperties = new CertificateObject(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of CertificateObjectGlobalRulestackResourceInner class. */ + public CertificateObjectGlobalRulestackResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private CertificateObject 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 certificateSignerResourceId property: Resource Id of certificate signer, to be populated only when + * certificateSelfSigned is false. + * + * @return the certificateSignerResourceId value. + */ + public String certificateSignerResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().certificateSignerResourceId(); + } + + /** + * Set the certificateSignerResourceId property: Resource Id of certificate signer, to be populated only when + * certificateSelfSigned is false. + * + * @param certificateSignerResourceId the certificateSignerResourceId value to set. + * @return the CertificateObjectGlobalRulestackResourceInner object itself. + */ + public CertificateObjectGlobalRulestackResourceInner withCertificateSignerResourceId( + String certificateSignerResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateObject(); + } + this.innerProperties().withCertificateSignerResourceId(certificateSignerResourceId); + return this; + } + + /** + * Get the certificateSelfSigned property: use certificate self signed. + * + * @return the certificateSelfSigned value. + */ + public BooleanEnum certificateSelfSigned() { + return this.innerProperties() == null ? null : this.innerProperties().certificateSelfSigned(); + } + + /** + * Set the certificateSelfSigned property: use certificate self signed. + * + * @param certificateSelfSigned the certificateSelfSigned value to set. + * @return the CertificateObjectGlobalRulestackResourceInner object itself. + */ + public CertificateObjectGlobalRulestackResourceInner withCertificateSelfSigned(BooleanEnum certificateSelfSigned) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateObject(); + } + this.innerProperties().withCertificateSelfSigned(certificateSelfSigned); + return this; + } + + /** + * Get the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.innerProperties() == null ? null : this.innerProperties().auditComment(); + } + + /** + * Set the auditComment property: comment for this object. + * + * @param auditComment the auditComment value to set. + * @return the CertificateObjectGlobalRulestackResourceInner object itself. + */ + public CertificateObjectGlobalRulestackResourceInner withAuditComment(String auditComment) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateObject(); + } + this.innerProperties().withAuditComment(auditComment); + return this; + } + + /** + * Get the description property: user description for this object. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: user description for this object. + * + * @param description the description value to set. + * @return the CertificateObjectGlobalRulestackResourceInner object itself. + */ + public CertificateObjectGlobalRulestackResourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateObject(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the etag property: read only string representing last create or update. + * + * @return the etag value. + */ + public String etag() { + return this.innerProperties() == null ? null : this.innerProperties().etag(); + } + + /** + * Set the etag property: read only string representing last create or update. + * + * @param etag the etag value to set. + * @return the CertificateObjectGlobalRulestackResourceInner object itself. + */ + public CertificateObjectGlobalRulestackResourceInner withEtag(String etag) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateObject(); + } + this.innerProperties().withEtag(etag); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + 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 + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model" + + " CertificateObjectGlobalRulestackResourceInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CertificateObjectGlobalRulestackResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CertificateObjectLocalRulestackResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CertificateObjectLocalRulestackResourceInner.java new file mode 100644 index 000000000000..d789c764c000 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CertificateObjectLocalRulestackResourceInner.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** LocalRulestack Certificate Object. */ +@Fluent +public final class CertificateObjectLocalRulestackResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private CertificateObject innerProperties = new CertificateObject(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of CertificateObjectLocalRulestackResourceInner class. */ + public CertificateObjectLocalRulestackResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private CertificateObject 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 certificateSignerResourceId property: Resource Id of certificate signer, to be populated only when + * certificateSelfSigned is false. + * + * @return the certificateSignerResourceId value. + */ + public String certificateSignerResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().certificateSignerResourceId(); + } + + /** + * Set the certificateSignerResourceId property: Resource Id of certificate signer, to be populated only when + * certificateSelfSigned is false. + * + * @param certificateSignerResourceId the certificateSignerResourceId value to set. + * @return the CertificateObjectLocalRulestackResourceInner object itself. + */ + public CertificateObjectLocalRulestackResourceInner withCertificateSignerResourceId( + String certificateSignerResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateObject(); + } + this.innerProperties().withCertificateSignerResourceId(certificateSignerResourceId); + return this; + } + + /** + * Get the certificateSelfSigned property: use certificate self signed. + * + * @return the certificateSelfSigned value. + */ + public BooleanEnum certificateSelfSigned() { + return this.innerProperties() == null ? null : this.innerProperties().certificateSelfSigned(); + } + + /** + * Set the certificateSelfSigned property: use certificate self signed. + * + * @param certificateSelfSigned the certificateSelfSigned value to set. + * @return the CertificateObjectLocalRulestackResourceInner object itself. + */ + public CertificateObjectLocalRulestackResourceInner withCertificateSelfSigned(BooleanEnum certificateSelfSigned) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateObject(); + } + this.innerProperties().withCertificateSelfSigned(certificateSelfSigned); + return this; + } + + /** + * Get the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.innerProperties() == null ? null : this.innerProperties().auditComment(); + } + + /** + * Set the auditComment property: comment for this object. + * + * @param auditComment the auditComment value to set. + * @return the CertificateObjectLocalRulestackResourceInner object itself. + */ + public CertificateObjectLocalRulestackResourceInner withAuditComment(String auditComment) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateObject(); + } + this.innerProperties().withAuditComment(auditComment); + return this; + } + + /** + * Get the description property: user description for this object. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: user description for this object. + * + * @param description the description value to set. + * @return the CertificateObjectLocalRulestackResourceInner object itself. + */ + public CertificateObjectLocalRulestackResourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateObject(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the etag property: read only string representing last create or update. + * + * @return the etag value. + */ + public String etag() { + return this.innerProperties() == null ? null : this.innerProperties().etag(); + } + + /** + * Set the etag property: read only string representing last create or update. + * + * @param etag the etag value to set. + * @return the CertificateObjectLocalRulestackResourceInner object itself. + */ + public CertificateObjectLocalRulestackResourceInner withEtag(String etag) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateObject(); + } + this.innerProperties().withEtag(etag); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + 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 + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model" + + " CertificateObjectLocalRulestackResourceInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CertificateObjectLocalRulestackResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/ChangelogInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/ChangelogInner.java new file mode 100644 index 000000000000..6d5216337057 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/ChangelogInner.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Changelog list. */ +@Fluent +public final class ChangelogInner { + /* + * list of changes + */ + @JsonProperty(value = "changes", required = true) + private List changes; + + /* + * lastCommitted timestamp + */ + @JsonProperty(value = "lastCommitted") + private OffsetDateTime lastCommitted; + + /* + * lastModified timestamp + */ + @JsonProperty(value = "lastModified") + private OffsetDateTime lastModified; + + /** Creates an instance of ChangelogInner class. */ + public ChangelogInner() { + } + + /** + * Get the changes property: list of changes. + * + * @return the changes value. + */ + public List changes() { + return this.changes; + } + + /** + * Set the changes property: list of changes. + * + * @param changes the changes value to set. + * @return the ChangelogInner object itself. + */ + public ChangelogInner withChanges(List changes) { + this.changes = changes; + return this; + } + + /** + * Get the lastCommitted property: lastCommitted timestamp. + * + * @return the lastCommitted value. + */ + public OffsetDateTime lastCommitted() { + return this.lastCommitted; + } + + /** + * Set the lastCommitted property: lastCommitted timestamp. + * + * @param lastCommitted the lastCommitted value to set. + * @return the ChangelogInner object itself. + */ + public ChangelogInner withLastCommitted(OffsetDateTime lastCommitted) { + this.lastCommitted = lastCommitted; + return this; + } + + /** + * Get the lastModified property: lastModified timestamp. + * + * @return the lastModified value. + */ + public OffsetDateTime lastModified() { + return this.lastModified; + } + + /** + * Set the lastModified property: lastModified timestamp. + * + * @param lastModified the lastModified value to set. + * @return the ChangelogInner object itself. + */ + public ChangelogInner withLastModified(OffsetDateTime lastModified) { + this.lastModified = lastModified; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (changes() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property changes in model ChangelogInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ChangelogInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CountriesResponseInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CountriesResponseInner.java new file mode 100644 index 000000000000..1ab121ad724f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/CountriesResponseInner.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.models.Country; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Countries Response Object. */ +@Fluent +public final class CountriesResponseInner { + /* + * List of countries + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * next link + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of CountriesResponseInner class. */ + public CountriesResponseInner() { + } + + /** + * Get the value property: List of countries. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of countries. + * + * @param value the value value to set. + * @return the CountriesResponseInner object itself. + */ + public CountriesResponseInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: next link. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: next link. + * + * @param nextLink the nextLink value to set. + * @return the CountriesResponseInner object itself. + */ + public CountriesResponseInner 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model CountriesResponseInner")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CountriesResponseInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallDeploymentProperties.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallDeploymentProperties.java new file mode 100644 index 000000000000..5326e71a445f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallDeploymentProperties.java @@ -0,0 +1,327 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DnsSettings; +import com.azure.resourcemanager.paloaltonetworks.models.FrontendSetting; +import com.azure.resourcemanager.paloaltonetworks.models.MarketplaceDetails; +import com.azure.resourcemanager.paloaltonetworks.models.NetworkProfile; +import com.azure.resourcemanager.paloaltonetworks.models.PanoramaConfig; +import com.azure.resourcemanager.paloaltonetworks.models.PlanData; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.RulestackDetails; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties specific to the Firewall resource deployment. */ +@Fluent +public final class FirewallDeploymentProperties { + /* + * panEtag info + */ + @JsonProperty(value = "panEtag") + private String panEtag; + + /* + * Network settings + */ + @JsonProperty(value = "networkProfile", required = true) + private NetworkProfile networkProfile; + + /* + * Panorama Managed: Default is False. Default will be CloudSec managed + */ + @JsonProperty(value = "isPanoramaManaged") + private BooleanEnum isPanoramaManaged; + + /* + * Panorama Configuration + */ + @JsonProperty(value = "panoramaConfig") + private PanoramaConfig panoramaConfig; + + /* + * Associated Rulestack + */ + @JsonProperty(value = "associatedRulestack") + private RulestackDetails associatedRulestack; + + /* + * DNS settings for Firewall + */ + @JsonProperty(value = "dnsSettings", required = true) + private DnsSettings dnsSettings; + + /* + * Frontend settings for Firewall + */ + @JsonProperty(value = "frontEndSettings") + private List frontEndSettings; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Billing plan information. + */ + @JsonProperty(value = "planData", required = true) + private PlanData planData; + + /* + * Marketplace details + */ + @JsonProperty(value = "marketplaceDetails", required = true) + private MarketplaceDetails marketplaceDetails; + + /** Creates an instance of FirewallDeploymentProperties class. */ + public FirewallDeploymentProperties() { + } + + /** + * Get the panEtag property: panEtag info. + * + * @return the panEtag value. + */ + public String panEtag() { + return this.panEtag; + } + + /** + * Set the panEtag property: panEtag info. + * + * @param panEtag the panEtag value to set. + * @return the FirewallDeploymentProperties object itself. + */ + public FirewallDeploymentProperties withPanEtag(String panEtag) { + this.panEtag = panEtag; + return this; + } + + /** + * Get the networkProfile property: Network settings. + * + * @return the networkProfile value. + */ + public NetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: Network settings. + * + * @param networkProfile the networkProfile value to set. + * @return the FirewallDeploymentProperties object itself. + */ + public FirewallDeploymentProperties withNetworkProfile(NetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get the isPanoramaManaged property: Panorama Managed: Default is False. Default will be CloudSec managed. + * + * @return the isPanoramaManaged value. + */ + public BooleanEnum isPanoramaManaged() { + return this.isPanoramaManaged; + } + + /** + * Set the isPanoramaManaged property: Panorama Managed: Default is False. Default will be CloudSec managed. + * + * @param isPanoramaManaged the isPanoramaManaged value to set. + * @return the FirewallDeploymentProperties object itself. + */ + public FirewallDeploymentProperties withIsPanoramaManaged(BooleanEnum isPanoramaManaged) { + this.isPanoramaManaged = isPanoramaManaged; + return this; + } + + /** + * Get the panoramaConfig property: Panorama Configuration. + * + * @return the panoramaConfig value. + */ + public PanoramaConfig panoramaConfig() { + return this.panoramaConfig; + } + + /** + * Set the panoramaConfig property: Panorama Configuration. + * + * @param panoramaConfig the panoramaConfig value to set. + * @return the FirewallDeploymentProperties object itself. + */ + public FirewallDeploymentProperties withPanoramaConfig(PanoramaConfig panoramaConfig) { + this.panoramaConfig = panoramaConfig; + return this; + } + + /** + * Get the associatedRulestack property: Associated Rulestack. + * + * @return the associatedRulestack value. + */ + public RulestackDetails associatedRulestack() { + return this.associatedRulestack; + } + + /** + * Set the associatedRulestack property: Associated Rulestack. + * + * @param associatedRulestack the associatedRulestack value to set. + * @return the FirewallDeploymentProperties object itself. + */ + public FirewallDeploymentProperties withAssociatedRulestack(RulestackDetails associatedRulestack) { + this.associatedRulestack = associatedRulestack; + return this; + } + + /** + * Get the dnsSettings property: DNS settings for Firewall. + * + * @return the dnsSettings value. + */ + public DnsSettings dnsSettings() { + return this.dnsSettings; + } + + /** + * Set the dnsSettings property: DNS settings for Firewall. + * + * @param dnsSettings the dnsSettings value to set. + * @return the FirewallDeploymentProperties object itself. + */ + public FirewallDeploymentProperties withDnsSettings(DnsSettings dnsSettings) { + this.dnsSettings = dnsSettings; + return this; + } + + /** + * Get the frontEndSettings property: Frontend settings for Firewall. + * + * @return the frontEndSettings value. + */ + public List frontEndSettings() { + return this.frontEndSettings; + } + + /** + * Set the frontEndSettings property: Frontend settings for Firewall. + * + * @param frontEndSettings the frontEndSettings value to set. + * @return the FirewallDeploymentProperties object itself. + */ + public FirewallDeploymentProperties withFrontEndSettings(List frontEndSettings) { + this.frontEndSettings = frontEndSettings; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the planData property: Billing plan information. + * + * @return the planData value. + */ + public PlanData planData() { + return this.planData; + } + + /** + * Set the planData property: Billing plan information. + * + * @param planData the planData value to set. + * @return the FirewallDeploymentProperties object itself. + */ + public FirewallDeploymentProperties withPlanData(PlanData planData) { + this.planData = planData; + return this; + } + + /** + * Get the marketplaceDetails property: Marketplace details. + * + * @return the marketplaceDetails value. + */ + public MarketplaceDetails marketplaceDetails() { + return this.marketplaceDetails; + } + + /** + * Set the marketplaceDetails property: Marketplace details. + * + * @param marketplaceDetails the marketplaceDetails value to set. + * @return the FirewallDeploymentProperties object itself. + */ + public FirewallDeploymentProperties withMarketplaceDetails(MarketplaceDetails marketplaceDetails) { + this.marketplaceDetails = marketplaceDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkProfile() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property networkProfile in model FirewallDeploymentProperties")); + } else { + networkProfile().validate(); + } + if (panoramaConfig() != null) { + panoramaConfig().validate(); + } + if (associatedRulestack() != null) { + associatedRulestack().validate(); + } + if (dnsSettings() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dnsSettings in model FirewallDeploymentProperties")); + } else { + dnsSettings().validate(); + } + if (frontEndSettings() != null) { + frontEndSettings().forEach(e -> e.validate()); + } + if (planData() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property planData in model FirewallDeploymentProperties")); + } else { + planData().validate(); + } + if (marketplaceDetails() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property marketplaceDetails in model FirewallDeploymentProperties")); + } else { + marketplaceDetails().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FirewallDeploymentProperties.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallResourceInner.java new file mode 100644 index 000000000000..aa46fcceff2c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallResourceInner.java @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DnsSettings; +import com.azure.resourcemanager.paloaltonetworks.models.FrontendSetting; +import com.azure.resourcemanager.paloaltonetworks.models.MarketplaceDetails; +import com.azure.resourcemanager.paloaltonetworks.models.NetworkProfile; +import com.azure.resourcemanager.paloaltonetworks.models.PanoramaConfig; +import com.azure.resourcemanager.paloaltonetworks.models.PlanData; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.RulestackDetails; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** PaloAltoNetworks Firewall. */ +@Fluent +public final class FirewallResourceInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private FirewallDeploymentProperties innerProperties = new FirewallDeploymentProperties(); + + /* + * The managed service identities assigned to this resource. + */ + @JsonProperty(value = "identity") + private AzureResourceManagerManagedIdentityProperties identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of FirewallResourceInner class. */ + public FirewallResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private FirewallDeploymentProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public AzureResourceManagerManagedIdentityProperties 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 FirewallResourceInner object itself. + */ + public FirewallResourceInner withIdentity(AzureResourceManagerManagedIdentityProperties 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; + } + + /** {@inheritDoc} */ + @Override + public FirewallResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public FirewallResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the panEtag property: panEtag info. + * + * @return the panEtag value. + */ + public String panEtag() { + return this.innerProperties() == null ? null : this.innerProperties().panEtag(); + } + + /** + * Set the panEtag property: panEtag info. + * + * @param panEtag the panEtag value to set. + * @return the FirewallResourceInner object itself. + */ + public FirewallResourceInner withPanEtag(String panEtag) { + if (this.innerProperties() == null) { + this.innerProperties = new FirewallDeploymentProperties(); + } + this.innerProperties().withPanEtag(panEtag); + return this; + } + + /** + * Get the networkProfile property: Network settings. + * + * @return the networkProfile value. + */ + public NetworkProfile networkProfile() { + return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); + } + + /** + * Set the networkProfile property: Network settings. + * + * @param networkProfile the networkProfile value to set. + * @return the FirewallResourceInner object itself. + */ + public FirewallResourceInner withNetworkProfile(NetworkProfile networkProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new FirewallDeploymentProperties(); + } + this.innerProperties().withNetworkProfile(networkProfile); + return this; + } + + /** + * Get the isPanoramaManaged property: Panorama Managed: Default is False. Default will be CloudSec managed. + * + * @return the isPanoramaManaged value. + */ + public BooleanEnum isPanoramaManaged() { + return this.innerProperties() == null ? null : this.innerProperties().isPanoramaManaged(); + } + + /** + * Set the isPanoramaManaged property: Panorama Managed: Default is False. Default will be CloudSec managed. + * + * @param isPanoramaManaged the isPanoramaManaged value to set. + * @return the FirewallResourceInner object itself. + */ + public FirewallResourceInner withIsPanoramaManaged(BooleanEnum isPanoramaManaged) { + if (this.innerProperties() == null) { + this.innerProperties = new FirewallDeploymentProperties(); + } + this.innerProperties().withIsPanoramaManaged(isPanoramaManaged); + return this; + } + + /** + * Get the panoramaConfig property: Panorama Configuration. + * + * @return the panoramaConfig value. + */ + public PanoramaConfig panoramaConfig() { + return this.innerProperties() == null ? null : this.innerProperties().panoramaConfig(); + } + + /** + * Set the panoramaConfig property: Panorama Configuration. + * + * @param panoramaConfig the panoramaConfig value to set. + * @return the FirewallResourceInner object itself. + */ + public FirewallResourceInner withPanoramaConfig(PanoramaConfig panoramaConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new FirewallDeploymentProperties(); + } + this.innerProperties().withPanoramaConfig(panoramaConfig); + return this; + } + + /** + * Get the associatedRulestack property: Associated Rulestack. + * + * @return the associatedRulestack value. + */ + public RulestackDetails associatedRulestack() { + return this.innerProperties() == null ? null : this.innerProperties().associatedRulestack(); + } + + /** + * Set the associatedRulestack property: Associated Rulestack. + * + * @param associatedRulestack the associatedRulestack value to set. + * @return the FirewallResourceInner object itself. + */ + public FirewallResourceInner withAssociatedRulestack(RulestackDetails associatedRulestack) { + if (this.innerProperties() == null) { + this.innerProperties = new FirewallDeploymentProperties(); + } + this.innerProperties().withAssociatedRulestack(associatedRulestack); + return this; + } + + /** + * Get the dnsSettings property: DNS settings for Firewall. + * + * @return the dnsSettings value. + */ + public DnsSettings dnsSettings() { + return this.innerProperties() == null ? null : this.innerProperties().dnsSettings(); + } + + /** + * Set the dnsSettings property: DNS settings for Firewall. + * + * @param dnsSettings the dnsSettings value to set. + * @return the FirewallResourceInner object itself. + */ + public FirewallResourceInner withDnsSettings(DnsSettings dnsSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new FirewallDeploymentProperties(); + } + this.innerProperties().withDnsSettings(dnsSettings); + return this; + } + + /** + * Get the frontEndSettings property: Frontend settings for Firewall. + * + * @return the frontEndSettings value. + */ + public List frontEndSettings() { + return this.innerProperties() == null ? null : this.innerProperties().frontEndSettings(); + } + + /** + * Set the frontEndSettings property: Frontend settings for Firewall. + * + * @param frontEndSettings the frontEndSettings value to set. + * @return the FirewallResourceInner object itself. + */ + public FirewallResourceInner withFrontEndSettings(List frontEndSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new FirewallDeploymentProperties(); + } + this.innerProperties().withFrontEndSettings(frontEndSettings); + return this; + } + + /** + * 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 planData property: Billing plan information. + * + * @return the planData value. + */ + public PlanData planData() { + return this.innerProperties() == null ? null : this.innerProperties().planData(); + } + + /** + * Set the planData property: Billing plan information. + * + * @param planData the planData value to set. + * @return the FirewallResourceInner object itself. + */ + public FirewallResourceInner withPlanData(PlanData planData) { + if (this.innerProperties() == null) { + this.innerProperties = new FirewallDeploymentProperties(); + } + this.innerProperties().withPlanData(planData); + return this; + } + + /** + * Get the marketplaceDetails property: Marketplace details. + * + * @return the marketplaceDetails value. + */ + public MarketplaceDetails marketplaceDetails() { + return this.innerProperties() == null ? null : this.innerProperties().marketplaceDetails(); + } + + /** + * Set the marketplaceDetails property: Marketplace details. + * + * @param marketplaceDetails the marketplaceDetails value to set. + * @return the FirewallResourceInner object itself. + */ + public FirewallResourceInner withMarketplaceDetails(MarketplaceDetails marketplaceDetails) { + if (this.innerProperties() == null) { + this.innerProperties = new FirewallDeploymentProperties(); + } + this.innerProperties().withMarketplaceDetails(marketplaceDetails); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model FirewallResourceInner")); + } else { + innerProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FirewallResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallStatusProperty.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallStatusProperty.java new file mode 100644 index 000000000000..7e04a21d7e7e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallStatusProperty.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.HealthStatus; +import com.azure.resourcemanager.paloaltonetworks.models.PanoramaStatus; +import com.azure.resourcemanager.paloaltonetworks.models.ReadOnlyProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Firewall Status. */ +@Immutable +public final class FirewallStatusProperty { + /* + * Panorama Managed: Default is False. Default will be CloudSec managed + */ + @JsonProperty(value = "isPanoramaManaged", access = JsonProperty.Access.WRITE_ONLY) + private BooleanEnum isPanoramaManaged; + + /* + * Current status of the Firewall + */ + @JsonProperty(value = "healthStatus", access = JsonProperty.Access.WRITE_ONLY) + private HealthStatus healthStatus; + + /* + * Detail description of current health of the Firewall + */ + @JsonProperty(value = "healthReason", access = JsonProperty.Access.WRITE_ONLY) + private String healthReason; + + /* + * Panorama Status + */ + @JsonProperty(value = "panoramaStatus", access = JsonProperty.Access.WRITE_ONLY) + private PanoramaStatus panoramaStatus; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ReadOnlyProvisioningState provisioningState; + + /** Creates an instance of FirewallStatusProperty class. */ + public FirewallStatusProperty() { + } + + /** + * Get the isPanoramaManaged property: Panorama Managed: Default is False. Default will be CloudSec managed. + * + * @return the isPanoramaManaged value. + */ + public BooleanEnum isPanoramaManaged() { + return this.isPanoramaManaged; + } + + /** + * Get the healthStatus property: Current status of the Firewall. + * + * @return the healthStatus value. + */ + public HealthStatus healthStatus() { + return this.healthStatus; + } + + /** + * Get the healthReason property: Detail description of current health of the Firewall. + * + * @return the healthReason value. + */ + public String healthReason() { + return this.healthReason; + } + + /** + * Get the panoramaStatus property: Panorama Status. + * + * @return the panoramaStatus value. + */ + public PanoramaStatus panoramaStatus() { + return this.panoramaStatus; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ReadOnlyProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (panoramaStatus() != null) { + panoramaStatus().validate(); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallStatusResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallStatusResourceInner.java new file mode 100644 index 000000000000..8b033b51c13f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FirewallStatusResourceInner.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +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.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.HealthStatus; +import com.azure.resourcemanager.paloaltonetworks.models.PanoramaStatus; +import com.azure.resourcemanager.paloaltonetworks.models.ReadOnlyProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Firewall Status. */ +@Immutable +public final class FirewallStatusResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private FirewallStatusProperty innerProperties = new FirewallStatusProperty(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of FirewallStatusResourceInner class. */ + public FirewallStatusResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private FirewallStatusProperty 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 isPanoramaManaged property: Panorama Managed: Default is False. Default will be CloudSec managed. + * + * @return the isPanoramaManaged value. + */ + public BooleanEnum isPanoramaManaged() { + return this.innerProperties() == null ? null : this.innerProperties().isPanoramaManaged(); + } + + /** + * Get the healthStatus property: Current status of the Firewall. + * + * @return the healthStatus value. + */ + public HealthStatus healthStatus() { + return this.innerProperties() == null ? null : this.innerProperties().healthStatus(); + } + + /** + * Get the healthReason property: Detail description of current health of the Firewall. + * + * @return the healthReason value. + */ + public String healthReason() { + return this.innerProperties() == null ? null : this.innerProperties().healthReason(); + } + + /** + * Get the panoramaStatus property: Panorama Status. + * + * @return the panoramaStatus value. + */ + public PanoramaStatus panoramaStatus() { + return this.innerProperties() == null ? null : this.innerProperties().panoramaStatus(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ReadOnlyProvisioningState 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 + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model FirewallStatusResourceInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FirewallStatusResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FqdnListGlobalRulestackResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FqdnListGlobalRulestackResourceInner.java new file mode 100644 index 000000000000..fd000fe8884d --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FqdnListGlobalRulestackResourceInner.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** GlobalRulestack fqdnList. */ +@Fluent +public final class FqdnListGlobalRulestackResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private FqdnObject innerProperties = new FqdnObject(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of FqdnListGlobalRulestackResourceInner class. */ + public FqdnListGlobalRulestackResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private FqdnObject 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 description property: fqdn object description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: fqdn object description. + * + * @param description the description value to set. + * @return the FqdnListGlobalRulestackResourceInner object itself. + */ + public FqdnListGlobalRulestackResourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new FqdnObject(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the fqdnList property: fqdn list. + * + * @return the fqdnList value. + */ + public List fqdnList() { + return this.innerProperties() == null ? null : this.innerProperties().fqdnList(); + } + + /** + * Set the fqdnList property: fqdn list. + * + * @param fqdnList the fqdnList value to set. + * @return the FqdnListGlobalRulestackResourceInner object itself. + */ + public FqdnListGlobalRulestackResourceInner withFqdnList(List fqdnList) { + if (this.innerProperties() == null) { + this.innerProperties = new FqdnObject(); + } + this.innerProperties().withFqdnList(fqdnList); + return this; + } + + /** + * Get the etag property: etag info. + * + * @return the etag value. + */ + public String etag() { + return this.innerProperties() == null ? null : this.innerProperties().etag(); + } + + /** + * Set the etag property: etag info. + * + * @param etag the etag value to set. + * @return the FqdnListGlobalRulestackResourceInner object itself. + */ + public FqdnListGlobalRulestackResourceInner withEtag(String etag) { + if (this.innerProperties() == null) { + this.innerProperties = new FqdnObject(); + } + this.innerProperties().withEtag(etag); + return this; + } + + /** + * Get the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.innerProperties() == null ? null : this.innerProperties().auditComment(); + } + + /** + * Set the auditComment property: comment for this object. + * + * @param auditComment the auditComment value to set. + * @return the FqdnListGlobalRulestackResourceInner object itself. + */ + public FqdnListGlobalRulestackResourceInner withAuditComment(String auditComment) { + if (this.innerProperties() == null) { + this.innerProperties = new FqdnObject(); + } + this.innerProperties().withAuditComment(auditComment); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + 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 + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model FqdnListGlobalRulestackResourceInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FqdnListGlobalRulestackResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FqdnListLocalRulestackResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FqdnListLocalRulestackResourceInner.java new file mode 100644 index 000000000000..ea8e64ddff80 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FqdnListLocalRulestackResourceInner.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** LocalRulestack fqdnList. */ +@Fluent +public final class FqdnListLocalRulestackResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private FqdnObject innerProperties = new FqdnObject(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of FqdnListLocalRulestackResourceInner class. */ + public FqdnListLocalRulestackResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private FqdnObject 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 description property: fqdn object description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: fqdn object description. + * + * @param description the description value to set. + * @return the FqdnListLocalRulestackResourceInner object itself. + */ + public FqdnListLocalRulestackResourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new FqdnObject(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the fqdnList property: fqdn list. + * + * @return the fqdnList value. + */ + public List fqdnList() { + return this.innerProperties() == null ? null : this.innerProperties().fqdnList(); + } + + /** + * Set the fqdnList property: fqdn list. + * + * @param fqdnList the fqdnList value to set. + * @return the FqdnListLocalRulestackResourceInner object itself. + */ + public FqdnListLocalRulestackResourceInner withFqdnList(List fqdnList) { + if (this.innerProperties() == null) { + this.innerProperties = new FqdnObject(); + } + this.innerProperties().withFqdnList(fqdnList); + return this; + } + + /** + * Get the etag property: etag info. + * + * @return the etag value. + */ + public String etag() { + return this.innerProperties() == null ? null : this.innerProperties().etag(); + } + + /** + * Set the etag property: etag info. + * + * @param etag the etag value to set. + * @return the FqdnListLocalRulestackResourceInner object itself. + */ + public FqdnListLocalRulestackResourceInner withEtag(String etag) { + if (this.innerProperties() == null) { + this.innerProperties = new FqdnObject(); + } + this.innerProperties().withEtag(etag); + return this; + } + + /** + * Get the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.innerProperties() == null ? null : this.innerProperties().auditComment(); + } + + /** + * Set the auditComment property: comment for this object. + * + * @param auditComment the auditComment value to set. + * @return the FqdnListLocalRulestackResourceInner object itself. + */ + public FqdnListLocalRulestackResourceInner withAuditComment(String auditComment) { + if (this.innerProperties() == null) { + this.innerProperties = new FqdnObject(); + } + this.innerProperties().withAuditComment(auditComment); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + 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 + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model FqdnListLocalRulestackResourceInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FqdnListLocalRulestackResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FqdnObject.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FqdnObject.java new file mode 100644 index 000000000000..1a86a189ffbe --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/FqdnObject.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** fqdn object. */ +@Fluent +public final class FqdnObject { + /* + * fqdn object description + */ + @JsonProperty(value = "description") + private String description; + + /* + * fqdn list + */ + @JsonProperty(value = "fqdnList", required = true) + private List fqdnList; + + /* + * etag info + */ + @JsonProperty(value = "etag") + private String etag; + + /* + * comment for this object + */ + @JsonProperty(value = "auditComment") + private String auditComment; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** Creates an instance of FqdnObject class. */ + public FqdnObject() { + } + + /** + * Get the description property: fqdn object description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: fqdn object description. + * + * @param description the description value to set. + * @return the FqdnObject object itself. + */ + public FqdnObject withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the fqdnList property: fqdn list. + * + * @return the fqdnList value. + */ + public List fqdnList() { + return this.fqdnList; + } + + /** + * Set the fqdnList property: fqdn list. + * + * @param fqdnList the fqdnList value to set. + * @return the FqdnObject object itself. + */ + public FqdnObject withFqdnList(List fqdnList) { + this.fqdnList = fqdnList; + return this; + } + + /** + * Get the etag property: etag info. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Set the etag property: etag info. + * + * @param etag the etag value to set. + * @return the FqdnObject object itself. + */ + public FqdnObject withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.auditComment; + } + + /** + * Set the auditComment property: comment for this object. + * + * @param auditComment the auditComment value to set. + * @return the FqdnObject object itself. + */ + public FqdnObject withAuditComment(String auditComment) { + this.auditComment = auditComment; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (fqdnList() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property fqdnList in model FqdnObject")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FqdnObject.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/GlobalRulestackInfoInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/GlobalRulestackInfoInner.java new file mode 100644 index 000000000000..9e7cef647705 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/GlobalRulestackInfoInner.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** PAN Rulestack Describe Object. */ +@Fluent +public final class GlobalRulestackInfoInner { + /* + * rulestack description + */ + @JsonProperty(value = "azureId", required = true) + private String azureId; + + /** Creates an instance of GlobalRulestackInfoInner class. */ + public GlobalRulestackInfoInner() { + } + + /** + * Get the azureId property: rulestack description. + * + * @return the azureId value. + */ + public String azureId() { + return this.azureId; + } + + /** + * Set the azureId property: rulestack description. + * + * @param azureId the azureId value to set. + * @return the GlobalRulestackInfoInner object itself. + */ + public GlobalRulestackInfoInner withAzureId(String azureId) { + this.azureId = azureId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azureId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property azureId in model GlobalRulestackInfoInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GlobalRulestackInfoInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/GlobalRulestackResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/GlobalRulestackResourceInner.java new file mode 100644 index 000000000000..9d38bdaf837d --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/GlobalRulestackResourceInner.java @@ -0,0 +1,327 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** PaloAltoNetworks GlobalRulestack. */ +@Fluent +public final class GlobalRulestackResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private RulestackProperties innerProperties = new RulestackProperties(); + + /* + * Global Location + */ + @JsonProperty(value = "location", required = true) + private String location; + + /* + * The managed service identities assigned to this resource. + */ + @JsonProperty(value = "identity") + private AzureResourceManagerManagedIdentityProperties identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of GlobalRulestackResourceInner class. */ + public GlobalRulestackResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private RulestackProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the location property: Global Location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Global Location. + * + * @param location the location value to set. + * @return the GlobalRulestackResourceInner object itself. + */ + public GlobalRulestackResourceInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public AzureResourceManagerManagedIdentityProperties 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 GlobalRulestackResourceInner object itself. + */ + public GlobalRulestackResourceInner withIdentity(AzureResourceManagerManagedIdentityProperties 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 panEtag property: PanEtag info. + * + * @return the panEtag value. + */ + public String panEtag() { + return this.innerProperties() == null ? null : this.innerProperties().panEtag(); + } + + /** + * Set the panEtag property: PanEtag info. + * + * @param panEtag the panEtag value to set. + * @return the GlobalRulestackResourceInner object itself. + */ + public GlobalRulestackResourceInner withPanEtag(String panEtag) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withPanEtag(panEtag); + return this; + } + + /** + * Get the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * + * @return the panLocation value. + */ + public String panLocation() { + return this.innerProperties() == null ? null : this.innerProperties().panLocation(); + } + + /** + * Set the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * + * @param panLocation the panLocation value to set. + * @return the GlobalRulestackResourceInner object itself. + */ + public GlobalRulestackResourceInner withPanLocation(String panLocation) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withPanLocation(panLocation); + return this; + } + + /** + * Get the scope property: Rulestack Type. + * + * @return the scope value. + */ + public ScopeType scope() { + return this.innerProperties() == null ? null : this.innerProperties().scope(); + } + + /** + * Set the scope property: Rulestack Type. + * + * @param scope the scope value to set. + * @return the GlobalRulestackResourceInner object itself. + */ + public GlobalRulestackResourceInner withScope(ScopeType scope) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withScope(scope); + return this; + } + + /** + * Get the associatedSubscriptions property: subscription scope of global rulestack. + * + * @return the associatedSubscriptions value. + */ + public List associatedSubscriptions() { + return this.innerProperties() == null ? null : this.innerProperties().associatedSubscriptions(); + } + + /** + * Set the associatedSubscriptions property: subscription scope of global rulestack. + * + * @param associatedSubscriptions the associatedSubscriptions value to set. + * @return the GlobalRulestackResourceInner object itself. + */ + public GlobalRulestackResourceInner withAssociatedSubscriptions(List associatedSubscriptions) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withAssociatedSubscriptions(associatedSubscriptions); + return this; + } + + /** + * Get the description property: rulestack description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: rulestack description. + * + * @param description the description value to set. + * @return the GlobalRulestackResourceInner object itself. + */ + public GlobalRulestackResourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the defaultMode property: Mode for default rules creation. + * + * @return the defaultMode value. + */ + public DefaultMode defaultMode() { + return this.innerProperties() == null ? null : this.innerProperties().defaultMode(); + } + + /** + * Set the defaultMode property: Mode for default rules creation. + * + * @param defaultMode the defaultMode value to set. + * @return the GlobalRulestackResourceInner object itself. + */ + public GlobalRulestackResourceInner withDefaultMode(DefaultMode defaultMode) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withDefaultMode(defaultMode); + return this; + } + + /** + * Get the minAppIdVersion property: minimum version. + * + * @return the minAppIdVersion value. + */ + public String minAppIdVersion() { + return this.innerProperties() == null ? null : this.innerProperties().minAppIdVersion(); + } + + /** + * Set the minAppIdVersion property: minimum version. + * + * @param minAppIdVersion the minAppIdVersion value to set. + * @return the GlobalRulestackResourceInner object itself. + */ + public GlobalRulestackResourceInner withMinAppIdVersion(String minAppIdVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withMinAppIdVersion(minAppIdVersion); + return this; + } + + /** + * 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 securityServices property: Security Profile. + * + * @return the securityServices value. + */ + public SecurityServices securityServices() { + return this.innerProperties() == null ? null : this.innerProperties().securityServices(); + } + + /** + * Set the securityServices property: Security Profile. + * + * @param securityServices the securityServices value to set. + * @return the GlobalRulestackResourceInner object itself. + */ + public GlobalRulestackResourceInner withSecurityServices(SecurityServices securityServices) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withSecurityServices(securityServices); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model GlobalRulestackResourceInner")); + } else { + innerProperties().validate(); + } + if (location() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property location in model GlobalRulestackResourceInner")); + } + if (identity() != null) { + identity().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GlobalRulestackResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/ListAppIdResponseInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/ListAppIdResponseInner.java new file mode 100644 index 000000000000..7773db442517 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/ListAppIdResponseInner.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ListAppIdResponse model. */ +@Fluent +public final class ListAppIdResponseInner { + /* + * List of AppIds + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * next Link + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of ListAppIdResponseInner class. */ + public ListAppIdResponseInner() { + } + + /** + * Get the value property: List of AppIds. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of AppIds. + * + * @param value the value value to set. + * @return the ListAppIdResponseInner object itself. + */ + public ListAppIdResponseInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: next Link. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: next Link. + * + * @param nextLink the nextLink value to set. + * @return the ListAppIdResponseInner object itself. + */ + public ListAppIdResponseInner 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ListAppIdResponseInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ListAppIdResponseInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/ListFirewallsResponseInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/ListFirewallsResponseInner.java new file mode 100644 index 000000000000..e7bbdfa1d491 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/ListFirewallsResponseInner.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List firewalls response. */ +@Fluent +public final class ListFirewallsResponseInner { + /* + * firewalls list + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * next link + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of ListFirewallsResponseInner class. */ + public ListFirewallsResponseInner() { + } + + /** + * Get the value property: firewalls list. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: firewalls list. + * + * @param value the value value to set. + * @return the ListFirewallsResponseInner object itself. + */ + public ListFirewallsResponseInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: next link. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: next link. + * + * @param nextLink the nextLink value to set. + * @return the ListFirewallsResponseInner object itself. + */ + public ListFirewallsResponseInner 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model ListFirewallsResponseInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ListFirewallsResponseInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/LocalRulesResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/LocalRulesResourceInner.java new file mode 100644 index 000000000000..1392acf67ec6 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/LocalRulesResourceInner.java @@ -0,0 +1,509 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** LocalRulestack rule list. */ +@Fluent +public final class LocalRulesResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private RuleEntry innerProperties = new RuleEntry(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of LocalRulesResourceInner class. */ + public LocalRulesResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private RuleEntry 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 etag property: etag info. + * + * @return the etag value. + */ + public String etag() { + return this.innerProperties() == null ? null : this.innerProperties().etag(); + } + + /** + * Set the etag property: etag info. + * + * @param etag the etag value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withEtag(String etag) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withEtag(etag); + return this; + } + + /** + * Get the ruleName property: rule name. + * + * @return the ruleName value. + */ + public String ruleName() { + return this.innerProperties() == null ? null : this.innerProperties().ruleName(); + } + + /** + * Set the ruleName property: rule name. + * + * @param ruleName the ruleName value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withRuleName(String ruleName) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withRuleName(ruleName); + return this; + } + + /** + * Get the priority property: The priority property. + * + * @return the priority value. + */ + public Integer priority() { + return this.innerProperties() == null ? null : this.innerProperties().priority(); + } + + /** + * Get the description property: rule description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: rule description. + * + * @param description the description value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the ruleState property: state of this rule. + * + * @return the ruleState value. + */ + public StateEnum ruleState() { + return this.innerProperties() == null ? null : this.innerProperties().ruleState(); + } + + /** + * Set the ruleState property: state of this rule. + * + * @param ruleState the ruleState value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withRuleState(StateEnum ruleState) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withRuleState(ruleState); + return this; + } + + /** + * Get the source property: source address. + * + * @return the source value. + */ + public SourceAddr source() { + return this.innerProperties() == null ? null : this.innerProperties().source(); + } + + /** + * Set the source property: source address. + * + * @param source the source value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withSource(SourceAddr source) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withSource(source); + return this; + } + + /** + * Get the negateSource property: cidr should not be 'any'. + * + * @return the negateSource value. + */ + public BooleanEnum negateSource() { + return this.innerProperties() == null ? null : this.innerProperties().negateSource(); + } + + /** + * Set the negateSource property: cidr should not be 'any'. + * + * @param negateSource the negateSource value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withNegateSource(BooleanEnum negateSource) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withNegateSource(negateSource); + return this; + } + + /** + * Get the destination property: destination address. + * + * @return the destination value. + */ + public DestinationAddr destination() { + return this.innerProperties() == null ? null : this.innerProperties().destination(); + } + + /** + * Set the destination property: destination address. + * + * @param destination the destination value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withDestination(DestinationAddr destination) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withDestination(destination); + return this; + } + + /** + * Get the negateDestination property: cidr should not be 'any'. + * + * @return the negateDestination value. + */ + public BooleanEnum negateDestination() { + return this.innerProperties() == null ? null : this.innerProperties().negateDestination(); + } + + /** + * Set the negateDestination property: cidr should not be 'any'. + * + * @param negateDestination the negateDestination value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withNegateDestination(BooleanEnum negateDestination) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withNegateDestination(negateDestination); + return this; + } + + /** + * Get the applications property: array of rule applications. + * + * @return the applications value. + */ + public List applications() { + return this.innerProperties() == null ? null : this.innerProperties().applications(); + } + + /** + * Set the applications property: array of rule applications. + * + * @param applications the applications value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withApplications(List applications) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withApplications(applications); + return this; + } + + /** + * Get the category property: rule category. + * + * @return the category value. + */ + public Category category() { + return this.innerProperties() == null ? null : this.innerProperties().category(); + } + + /** + * Set the category property: rule category. + * + * @param category the category value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withCategory(Category category) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withCategory(category); + return this; + } + + /** + * Get the protocol property: any, application-default, TCP:number, UDP:number. + * + * @return the protocol value. + */ + public String protocol() { + return this.innerProperties() == null ? null : this.innerProperties().protocol(); + } + + /** + * Set the protocol property: any, application-default, TCP:number, UDP:number. + * + * @param protocol the protocol value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withProtocol(String protocol) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withProtocol(protocol); + return this; + } + + /** + * Get the protocolPortList property: prot port list. + * + * @return the protocolPortList value. + */ + public List protocolPortList() { + return this.innerProperties() == null ? null : this.innerProperties().protocolPortList(); + } + + /** + * Set the protocolPortList property: prot port list. + * + * @param protocolPortList the protocolPortList value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withProtocolPortList(List protocolPortList) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withProtocolPortList(protocolPortList); + return this; + } + + /** + * Get the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @return the inboundInspectionCertificate value. + */ + public String inboundInspectionCertificate() { + return this.innerProperties() == null ? null : this.innerProperties().inboundInspectionCertificate(); + } + + /** + * Set the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @param inboundInspectionCertificate the inboundInspectionCertificate value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withInboundInspectionCertificate(String inboundInspectionCertificate) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withInboundInspectionCertificate(inboundInspectionCertificate); + return this; + } + + /** + * Get the auditComment property: rule comment. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.innerProperties() == null ? null : this.innerProperties().auditComment(); + } + + /** + * Set the auditComment property: rule comment. + * + * @param auditComment the auditComment value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withAuditComment(String auditComment) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withAuditComment(auditComment); + return this; + } + + /** + * Get the actionType property: rule action. + * + * @return the actionType value. + */ + public ActionEnum actionType() { + return this.innerProperties() == null ? null : this.innerProperties().actionType(); + } + + /** + * Set the actionType property: rule action. + * + * @param actionType the actionType value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withActionType(ActionEnum actionType) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withActionType(actionType); + return this; + } + + /** + * Get the enableLogging property: enable or disable logging. + * + * @return the enableLogging value. + */ + public StateEnum enableLogging() { + return this.innerProperties() == null ? null : this.innerProperties().enableLogging(); + } + + /** + * Set the enableLogging property: enable or disable logging. + * + * @param enableLogging the enableLogging value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withEnableLogging(StateEnum enableLogging) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withEnableLogging(enableLogging); + return this; + } + + /** + * Get the decryptionRuleType property: enable or disable decryption. + * + * @return the decryptionRuleType value. + */ + public DecryptionRuleTypeEnum decryptionRuleType() { + return this.innerProperties() == null ? null : this.innerProperties().decryptionRuleType(); + } + + /** + * Set the decryptionRuleType property: enable or disable decryption. + * + * @param decryptionRuleType the decryptionRuleType value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withDecryptionRuleType(DecryptionRuleTypeEnum decryptionRuleType) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withDecryptionRuleType(decryptionRuleType); + return this; + } + + /** + * Get the tags property: tag for rule. + * + * @return the tags value. + */ + public List tags() { + return this.innerProperties() == null ? null : this.innerProperties().tags(); + } + + /** + * Set the tags property: tag for rule. + * + * @param tags the tags value to set. + * @return the LocalRulesResourceInner object itself. + */ + public LocalRulesResourceInner withTags(List tags) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + 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 + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model LocalRulesResourceInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalRulesResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/LocalRulestackResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/LocalRulestackResourceInner.java new file mode 100644 index 000000000000..2604f9b814a2 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/LocalRulestackResourceInner.java @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** PaloAltoNetworks LocalRulestack. */ +@Fluent +public final class LocalRulestackResourceInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private RulestackProperties innerProperties = new RulestackProperties(); + + /* + * The managed service identities assigned to this resource. + */ + @JsonProperty(value = "identity") + private AzureResourceManagerManagedIdentityProperties identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of LocalRulestackResourceInner class. */ + public LocalRulestackResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private RulestackProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public AzureResourceManagerManagedIdentityProperties 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 LocalRulestackResourceInner object itself. + */ + public LocalRulestackResourceInner withIdentity(AzureResourceManagerManagedIdentityProperties 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; + } + + /** {@inheritDoc} */ + @Override + public LocalRulestackResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public LocalRulestackResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the panEtag property: PanEtag info. + * + * @return the panEtag value. + */ + public String panEtag() { + return this.innerProperties() == null ? null : this.innerProperties().panEtag(); + } + + /** + * Set the panEtag property: PanEtag info. + * + * @param panEtag the panEtag value to set. + * @return the LocalRulestackResourceInner object itself. + */ + public LocalRulestackResourceInner withPanEtag(String panEtag) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withPanEtag(panEtag); + return this; + } + + /** + * Get the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * + * @return the panLocation value. + */ + public String panLocation() { + return this.innerProperties() == null ? null : this.innerProperties().panLocation(); + } + + /** + * Set the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * + * @param panLocation the panLocation value to set. + * @return the LocalRulestackResourceInner object itself. + */ + public LocalRulestackResourceInner withPanLocation(String panLocation) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withPanLocation(panLocation); + return this; + } + + /** + * Get the scope property: Rulestack Type. + * + * @return the scope value. + */ + public ScopeType scope() { + return this.innerProperties() == null ? null : this.innerProperties().scope(); + } + + /** + * Set the scope property: Rulestack Type. + * + * @param scope the scope value to set. + * @return the LocalRulestackResourceInner object itself. + */ + public LocalRulestackResourceInner withScope(ScopeType scope) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withScope(scope); + return this; + } + + /** + * Get the associatedSubscriptions property: subscription scope of global rulestack. + * + * @return the associatedSubscriptions value. + */ + public List associatedSubscriptions() { + return this.innerProperties() == null ? null : this.innerProperties().associatedSubscriptions(); + } + + /** + * Set the associatedSubscriptions property: subscription scope of global rulestack. + * + * @param associatedSubscriptions the associatedSubscriptions value to set. + * @return the LocalRulestackResourceInner object itself. + */ + public LocalRulestackResourceInner withAssociatedSubscriptions(List associatedSubscriptions) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withAssociatedSubscriptions(associatedSubscriptions); + return this; + } + + /** + * Get the description property: rulestack description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: rulestack description. + * + * @param description the description value to set. + * @return the LocalRulestackResourceInner object itself. + */ + public LocalRulestackResourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the defaultMode property: Mode for default rules creation. + * + * @return the defaultMode value. + */ + public DefaultMode defaultMode() { + return this.innerProperties() == null ? null : this.innerProperties().defaultMode(); + } + + /** + * Set the defaultMode property: Mode for default rules creation. + * + * @param defaultMode the defaultMode value to set. + * @return the LocalRulestackResourceInner object itself. + */ + public LocalRulestackResourceInner withDefaultMode(DefaultMode defaultMode) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withDefaultMode(defaultMode); + return this; + } + + /** + * Get the minAppIdVersion property: minimum version. + * + * @return the minAppIdVersion value. + */ + public String minAppIdVersion() { + return this.innerProperties() == null ? null : this.innerProperties().minAppIdVersion(); + } + + /** + * Set the minAppIdVersion property: minimum version. + * + * @param minAppIdVersion the minAppIdVersion value to set. + * @return the LocalRulestackResourceInner object itself. + */ + public LocalRulestackResourceInner withMinAppIdVersion(String minAppIdVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withMinAppIdVersion(minAppIdVersion); + return this; + } + + /** + * 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 securityServices property: Security Profile. + * + * @return the securityServices value. + */ + public SecurityServices securityServices() { + return this.innerProperties() == null ? null : this.innerProperties().securityServices(); + } + + /** + * Set the securityServices property: Security Profile. + * + * @param securityServices the securityServices value to set. + * @return the LocalRulestackResourceInner object itself. + */ + public LocalRulestackResourceInner withSecurityServices(SecurityServices securityServices) { + if (this.innerProperties() == null) { + this.innerProperties = new RulestackProperties(); + } + this.innerProperties().withSecurityServices(securityServices); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model LocalRulestackResourceInner")); + } else { + innerProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalRulestackResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/LogSettingsInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/LogSettingsInner.java new file mode 100644 index 000000000000..0326f2c42126 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/LogSettingsInner.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.paloaltonetworks.models.ApplicationInsights; +import com.azure.resourcemanager.paloaltonetworks.models.LogDestination; +import com.azure.resourcemanager.paloaltonetworks.models.LogOption; +import com.azure.resourcemanager.paloaltonetworks.models.LogType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Log Settings for Firewall. */ +@Fluent +public final class LogSettingsInner { + /* + * One of possible log type + */ + @JsonProperty(value = "logType") + private LogType logType; + + /* + * Log option SAME/INDIVIDUAL + */ + @JsonProperty(value = "logOption") + private LogOption logOption; + + /* + * Application Insight details + */ + @JsonProperty(value = "applicationInsights") + private ApplicationInsights applicationInsights; + + /* + * Common destination configurations + */ + @JsonProperty(value = "commonDestination") + private LogDestination commonDestination; + + /* + * Traffic destination configurations + */ + @JsonProperty(value = "trafficLogDestination") + private LogDestination trafficLogDestination; + + /* + * Threat destination configurations + */ + @JsonProperty(value = "threatLogDestination") + private LogDestination threatLogDestination; + + /* + * Decrypt destination configurations + */ + @JsonProperty(value = "decryptLogDestination") + private LogDestination decryptLogDestination; + + /** Creates an instance of LogSettingsInner class. */ + public LogSettingsInner() { + } + + /** + * Get the logType property: One of possible log type. + * + * @return the logType value. + */ + public LogType logType() { + return this.logType; + } + + /** + * Set the logType property: One of possible log type. + * + * @param logType the logType value to set. + * @return the LogSettingsInner object itself. + */ + public LogSettingsInner withLogType(LogType logType) { + this.logType = logType; + return this; + } + + /** + * Get the logOption property: Log option SAME/INDIVIDUAL. + * + * @return the logOption value. + */ + public LogOption logOption() { + return this.logOption; + } + + /** + * Set the logOption property: Log option SAME/INDIVIDUAL. + * + * @param logOption the logOption value to set. + * @return the LogSettingsInner object itself. + */ + public LogSettingsInner withLogOption(LogOption logOption) { + this.logOption = logOption; + return this; + } + + /** + * Get the applicationInsights property: Application Insight details. + * + * @return the applicationInsights value. + */ + public ApplicationInsights applicationInsights() { + return this.applicationInsights; + } + + /** + * Set the applicationInsights property: Application Insight details. + * + * @param applicationInsights the applicationInsights value to set. + * @return the LogSettingsInner object itself. + */ + public LogSettingsInner withApplicationInsights(ApplicationInsights applicationInsights) { + this.applicationInsights = applicationInsights; + return this; + } + + /** + * Get the commonDestination property: Common destination configurations. + * + * @return the commonDestination value. + */ + public LogDestination commonDestination() { + return this.commonDestination; + } + + /** + * Set the commonDestination property: Common destination configurations. + * + * @param commonDestination the commonDestination value to set. + * @return the LogSettingsInner object itself. + */ + public LogSettingsInner withCommonDestination(LogDestination commonDestination) { + this.commonDestination = commonDestination; + return this; + } + + /** + * Get the trafficLogDestination property: Traffic destination configurations. + * + * @return the trafficLogDestination value. + */ + public LogDestination trafficLogDestination() { + return this.trafficLogDestination; + } + + /** + * Set the trafficLogDestination property: Traffic destination configurations. + * + * @param trafficLogDestination the trafficLogDestination value to set. + * @return the LogSettingsInner object itself. + */ + public LogSettingsInner withTrafficLogDestination(LogDestination trafficLogDestination) { + this.trafficLogDestination = trafficLogDestination; + return this; + } + + /** + * Get the threatLogDestination property: Threat destination configurations. + * + * @return the threatLogDestination value. + */ + public LogDestination threatLogDestination() { + return this.threatLogDestination; + } + + /** + * Set the threatLogDestination property: Threat destination configurations. + * + * @param threatLogDestination the threatLogDestination value to set. + * @return the LogSettingsInner object itself. + */ + public LogSettingsInner withThreatLogDestination(LogDestination threatLogDestination) { + this.threatLogDestination = threatLogDestination; + return this; + } + + /** + * Get the decryptLogDestination property: Decrypt destination configurations. + * + * @return the decryptLogDestination value. + */ + public LogDestination decryptLogDestination() { + return this.decryptLogDestination; + } + + /** + * Set the decryptLogDestination property: Decrypt destination configurations. + * + * @param decryptLogDestination the decryptLogDestination value to set. + * @return the LogSettingsInner object itself. + */ + public LogSettingsInner withDecryptLogDestination(LogDestination decryptLogDestination) { + this.decryptLogDestination = decryptLogDestination; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (applicationInsights() != null) { + applicationInsights().validate(); + } + if (commonDestination() != null) { + commonDestination().validate(); + } + if (trafficLogDestination() != null) { + trafficLogDestination().validate(); + } + if (threatLogDestination() != null) { + threatLogDestination().validate(); + } + if (decryptLogDestination() != null) { + decryptLogDestination().validate(); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/OperationInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/OperationInner.java new file mode 100644 index 000000000000..37ecadd530db --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/OperationInner.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.paloaltonetworks.models.ActionType; +import com.azure.resourcemanager.paloaltonetworks.models.OperationDisplay; +import com.azure.resourcemanager.paloaltonetworks.models.Origin; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * REST API Operation + * + *

Details of a REST API operation, returned from the Resource Provider Operations API. + */ +@Fluent +public final class OperationInner { + /* + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for + * ARM/control-plane operations. + */ + @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDataAction; + + /* + * Localized display information for this particular operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /* + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private Origin origin; + + /* + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ + @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + private ActionType actionType; + + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + + /** + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + public String name() { + return this.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. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Get the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + 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". + * + * @return the origin value. + */ + public Origin origin() { + return this.origin; + } + + /** + * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + 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(); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PostRulesResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PostRulesResourceInner.java new file mode 100644 index 000000000000..8b4e6bae8e80 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PostRulesResourceInner.java @@ -0,0 +1,509 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** PostRulestack rule list. */ +@Fluent +public final class PostRulesResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private RuleEntry innerProperties = new RuleEntry(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of PostRulesResourceInner class. */ + public PostRulesResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private RuleEntry 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 etag property: etag info. + * + * @return the etag value. + */ + public String etag() { + return this.innerProperties() == null ? null : this.innerProperties().etag(); + } + + /** + * Set the etag property: etag info. + * + * @param etag the etag value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withEtag(String etag) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withEtag(etag); + return this; + } + + /** + * Get the ruleName property: rule name. + * + * @return the ruleName value. + */ + public String ruleName() { + return this.innerProperties() == null ? null : this.innerProperties().ruleName(); + } + + /** + * Set the ruleName property: rule name. + * + * @param ruleName the ruleName value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withRuleName(String ruleName) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withRuleName(ruleName); + return this; + } + + /** + * Get the priority property: The priority property. + * + * @return the priority value. + */ + public Integer priority() { + return this.innerProperties() == null ? null : this.innerProperties().priority(); + } + + /** + * Get the description property: rule description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: rule description. + * + * @param description the description value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the ruleState property: state of this rule. + * + * @return the ruleState value. + */ + public StateEnum ruleState() { + return this.innerProperties() == null ? null : this.innerProperties().ruleState(); + } + + /** + * Set the ruleState property: state of this rule. + * + * @param ruleState the ruleState value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withRuleState(StateEnum ruleState) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withRuleState(ruleState); + return this; + } + + /** + * Get the source property: source address. + * + * @return the source value. + */ + public SourceAddr source() { + return this.innerProperties() == null ? null : this.innerProperties().source(); + } + + /** + * Set the source property: source address. + * + * @param source the source value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withSource(SourceAddr source) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withSource(source); + return this; + } + + /** + * Get the negateSource property: cidr should not be 'any'. + * + * @return the negateSource value. + */ + public BooleanEnum negateSource() { + return this.innerProperties() == null ? null : this.innerProperties().negateSource(); + } + + /** + * Set the negateSource property: cidr should not be 'any'. + * + * @param negateSource the negateSource value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withNegateSource(BooleanEnum negateSource) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withNegateSource(negateSource); + return this; + } + + /** + * Get the destination property: destination address. + * + * @return the destination value. + */ + public DestinationAddr destination() { + return this.innerProperties() == null ? null : this.innerProperties().destination(); + } + + /** + * Set the destination property: destination address. + * + * @param destination the destination value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withDestination(DestinationAddr destination) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withDestination(destination); + return this; + } + + /** + * Get the negateDestination property: cidr should not be 'any'. + * + * @return the negateDestination value. + */ + public BooleanEnum negateDestination() { + return this.innerProperties() == null ? null : this.innerProperties().negateDestination(); + } + + /** + * Set the negateDestination property: cidr should not be 'any'. + * + * @param negateDestination the negateDestination value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withNegateDestination(BooleanEnum negateDestination) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withNegateDestination(negateDestination); + return this; + } + + /** + * Get the applications property: array of rule applications. + * + * @return the applications value. + */ + public List applications() { + return this.innerProperties() == null ? null : this.innerProperties().applications(); + } + + /** + * Set the applications property: array of rule applications. + * + * @param applications the applications value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withApplications(List applications) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withApplications(applications); + return this; + } + + /** + * Get the category property: rule category. + * + * @return the category value. + */ + public Category category() { + return this.innerProperties() == null ? null : this.innerProperties().category(); + } + + /** + * Set the category property: rule category. + * + * @param category the category value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withCategory(Category category) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withCategory(category); + return this; + } + + /** + * Get the protocol property: any, application-default, TCP:number, UDP:number. + * + * @return the protocol value. + */ + public String protocol() { + return this.innerProperties() == null ? null : this.innerProperties().protocol(); + } + + /** + * Set the protocol property: any, application-default, TCP:number, UDP:number. + * + * @param protocol the protocol value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withProtocol(String protocol) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withProtocol(protocol); + return this; + } + + /** + * Get the protocolPortList property: prot port list. + * + * @return the protocolPortList value. + */ + public List protocolPortList() { + return this.innerProperties() == null ? null : this.innerProperties().protocolPortList(); + } + + /** + * Set the protocolPortList property: prot port list. + * + * @param protocolPortList the protocolPortList value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withProtocolPortList(List protocolPortList) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withProtocolPortList(protocolPortList); + return this; + } + + /** + * Get the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @return the inboundInspectionCertificate value. + */ + public String inboundInspectionCertificate() { + return this.innerProperties() == null ? null : this.innerProperties().inboundInspectionCertificate(); + } + + /** + * Set the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @param inboundInspectionCertificate the inboundInspectionCertificate value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withInboundInspectionCertificate(String inboundInspectionCertificate) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withInboundInspectionCertificate(inboundInspectionCertificate); + return this; + } + + /** + * Get the auditComment property: rule comment. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.innerProperties() == null ? null : this.innerProperties().auditComment(); + } + + /** + * Set the auditComment property: rule comment. + * + * @param auditComment the auditComment value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withAuditComment(String auditComment) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withAuditComment(auditComment); + return this; + } + + /** + * Get the actionType property: rule action. + * + * @return the actionType value. + */ + public ActionEnum actionType() { + return this.innerProperties() == null ? null : this.innerProperties().actionType(); + } + + /** + * Set the actionType property: rule action. + * + * @param actionType the actionType value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withActionType(ActionEnum actionType) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withActionType(actionType); + return this; + } + + /** + * Get the enableLogging property: enable or disable logging. + * + * @return the enableLogging value. + */ + public StateEnum enableLogging() { + return this.innerProperties() == null ? null : this.innerProperties().enableLogging(); + } + + /** + * Set the enableLogging property: enable or disable logging. + * + * @param enableLogging the enableLogging value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withEnableLogging(StateEnum enableLogging) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withEnableLogging(enableLogging); + return this; + } + + /** + * Get the decryptionRuleType property: enable or disable decryption. + * + * @return the decryptionRuleType value. + */ + public DecryptionRuleTypeEnum decryptionRuleType() { + return this.innerProperties() == null ? null : this.innerProperties().decryptionRuleType(); + } + + /** + * Set the decryptionRuleType property: enable or disable decryption. + * + * @param decryptionRuleType the decryptionRuleType value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withDecryptionRuleType(DecryptionRuleTypeEnum decryptionRuleType) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withDecryptionRuleType(decryptionRuleType); + return this; + } + + /** + * Get the tags property: tag for rule. + * + * @return the tags value. + */ + public List tags() { + return this.innerProperties() == null ? null : this.innerProperties().tags(); + } + + /** + * Set the tags property: tag for rule. + * + * @param tags the tags value to set. + * @return the PostRulesResourceInner object itself. + */ + public PostRulesResourceInner withTags(List tags) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + 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 + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model PostRulesResourceInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PostRulesResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PreRulesResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PreRulesResourceInner.java new file mode 100644 index 000000000000..3ad8eb189972 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PreRulesResourceInner.java @@ -0,0 +1,509 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** PreRulestack rule list. */ +@Fluent +public final class PreRulesResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private RuleEntry innerProperties = new RuleEntry(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of PreRulesResourceInner class. */ + public PreRulesResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private RuleEntry 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 etag property: etag info. + * + * @return the etag value. + */ + public String etag() { + return this.innerProperties() == null ? null : this.innerProperties().etag(); + } + + /** + * Set the etag property: etag info. + * + * @param etag the etag value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withEtag(String etag) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withEtag(etag); + return this; + } + + /** + * Get the ruleName property: rule name. + * + * @return the ruleName value. + */ + public String ruleName() { + return this.innerProperties() == null ? null : this.innerProperties().ruleName(); + } + + /** + * Set the ruleName property: rule name. + * + * @param ruleName the ruleName value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withRuleName(String ruleName) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withRuleName(ruleName); + return this; + } + + /** + * Get the priority property: The priority property. + * + * @return the priority value. + */ + public Integer priority() { + return this.innerProperties() == null ? null : this.innerProperties().priority(); + } + + /** + * Get the description property: rule description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: rule description. + * + * @param description the description value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the ruleState property: state of this rule. + * + * @return the ruleState value. + */ + public StateEnum ruleState() { + return this.innerProperties() == null ? null : this.innerProperties().ruleState(); + } + + /** + * Set the ruleState property: state of this rule. + * + * @param ruleState the ruleState value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withRuleState(StateEnum ruleState) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withRuleState(ruleState); + return this; + } + + /** + * Get the source property: source address. + * + * @return the source value. + */ + public SourceAddr source() { + return this.innerProperties() == null ? null : this.innerProperties().source(); + } + + /** + * Set the source property: source address. + * + * @param source the source value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withSource(SourceAddr source) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withSource(source); + return this; + } + + /** + * Get the negateSource property: cidr should not be 'any'. + * + * @return the negateSource value. + */ + public BooleanEnum negateSource() { + return this.innerProperties() == null ? null : this.innerProperties().negateSource(); + } + + /** + * Set the negateSource property: cidr should not be 'any'. + * + * @param negateSource the negateSource value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withNegateSource(BooleanEnum negateSource) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withNegateSource(negateSource); + return this; + } + + /** + * Get the destination property: destination address. + * + * @return the destination value. + */ + public DestinationAddr destination() { + return this.innerProperties() == null ? null : this.innerProperties().destination(); + } + + /** + * Set the destination property: destination address. + * + * @param destination the destination value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withDestination(DestinationAddr destination) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withDestination(destination); + return this; + } + + /** + * Get the negateDestination property: cidr should not be 'any'. + * + * @return the negateDestination value. + */ + public BooleanEnum negateDestination() { + return this.innerProperties() == null ? null : this.innerProperties().negateDestination(); + } + + /** + * Set the negateDestination property: cidr should not be 'any'. + * + * @param negateDestination the negateDestination value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withNegateDestination(BooleanEnum negateDestination) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withNegateDestination(negateDestination); + return this; + } + + /** + * Get the applications property: array of rule applications. + * + * @return the applications value. + */ + public List applications() { + return this.innerProperties() == null ? null : this.innerProperties().applications(); + } + + /** + * Set the applications property: array of rule applications. + * + * @param applications the applications value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withApplications(List applications) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withApplications(applications); + return this; + } + + /** + * Get the category property: rule category. + * + * @return the category value. + */ + public Category category() { + return this.innerProperties() == null ? null : this.innerProperties().category(); + } + + /** + * Set the category property: rule category. + * + * @param category the category value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withCategory(Category category) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withCategory(category); + return this; + } + + /** + * Get the protocol property: any, application-default, TCP:number, UDP:number. + * + * @return the protocol value. + */ + public String protocol() { + return this.innerProperties() == null ? null : this.innerProperties().protocol(); + } + + /** + * Set the protocol property: any, application-default, TCP:number, UDP:number. + * + * @param protocol the protocol value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withProtocol(String protocol) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withProtocol(protocol); + return this; + } + + /** + * Get the protocolPortList property: prot port list. + * + * @return the protocolPortList value. + */ + public List protocolPortList() { + return this.innerProperties() == null ? null : this.innerProperties().protocolPortList(); + } + + /** + * Set the protocolPortList property: prot port list. + * + * @param protocolPortList the protocolPortList value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withProtocolPortList(List protocolPortList) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withProtocolPortList(protocolPortList); + return this; + } + + /** + * Get the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @return the inboundInspectionCertificate value. + */ + public String inboundInspectionCertificate() { + return this.innerProperties() == null ? null : this.innerProperties().inboundInspectionCertificate(); + } + + /** + * Set the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @param inboundInspectionCertificate the inboundInspectionCertificate value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withInboundInspectionCertificate(String inboundInspectionCertificate) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withInboundInspectionCertificate(inboundInspectionCertificate); + return this; + } + + /** + * Get the auditComment property: rule comment. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.innerProperties() == null ? null : this.innerProperties().auditComment(); + } + + /** + * Set the auditComment property: rule comment. + * + * @param auditComment the auditComment value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withAuditComment(String auditComment) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withAuditComment(auditComment); + return this; + } + + /** + * Get the actionType property: rule action. + * + * @return the actionType value. + */ + public ActionEnum actionType() { + return this.innerProperties() == null ? null : this.innerProperties().actionType(); + } + + /** + * Set the actionType property: rule action. + * + * @param actionType the actionType value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withActionType(ActionEnum actionType) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withActionType(actionType); + return this; + } + + /** + * Get the enableLogging property: enable or disable logging. + * + * @return the enableLogging value. + */ + public StateEnum enableLogging() { + return this.innerProperties() == null ? null : this.innerProperties().enableLogging(); + } + + /** + * Set the enableLogging property: enable or disable logging. + * + * @param enableLogging the enableLogging value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withEnableLogging(StateEnum enableLogging) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withEnableLogging(enableLogging); + return this; + } + + /** + * Get the decryptionRuleType property: enable or disable decryption. + * + * @return the decryptionRuleType value. + */ + public DecryptionRuleTypeEnum decryptionRuleType() { + return this.innerProperties() == null ? null : this.innerProperties().decryptionRuleType(); + } + + /** + * Set the decryptionRuleType property: enable or disable decryption. + * + * @param decryptionRuleType the decryptionRuleType value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withDecryptionRuleType(DecryptionRuleTypeEnum decryptionRuleType) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withDecryptionRuleType(decryptionRuleType); + return this; + } + + /** + * Get the tags property: tag for rule. + * + * @return the tags value. + */ + public List tags() { + return this.innerProperties() == null ? null : this.innerProperties().tags(); + } + + /** + * Set the tags property: tag for rule. + * + * @param tags the tags value to set. + * @return the PreRulesResourceInner object itself. + */ + public PreRulesResourceInner withTags(List tags) { + if (this.innerProperties() == null) { + this.innerProperties = new RuleEntry(); + } + this.innerProperties().withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + 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 + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model PreRulesResourceInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PreRulesResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PredefinedUrlCategoriesResponseInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PredefinedUrlCategoriesResponseInner.java new file mode 100644 index 000000000000..d798bfe1496a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PredefinedUrlCategoriesResponseInner.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.models.PredefinedUrlCategory; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** predefined url categories response. */ +@Fluent +public final class PredefinedUrlCategoriesResponseInner { + /* + * predefined url categories + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * next link + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of PredefinedUrlCategoriesResponseInner class. */ + public PredefinedUrlCategoriesResponseInner() { + } + + /** + * Get the value property: predefined url categories. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: predefined url categories. + * + * @param value the value value to set. + * @return the PredefinedUrlCategoriesResponseInner object itself. + */ + public PredefinedUrlCategoriesResponseInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: next link. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: next link. + * + * @param nextLink the nextLink value to set. + * @return the PredefinedUrlCategoriesResponseInner object itself. + */ + public PredefinedUrlCategoriesResponseInner 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model PredefinedUrlCategoriesResponseInner")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PredefinedUrlCategoriesResponseInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PrefixListGlobalRulestackResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PrefixListGlobalRulestackResourceInner.java new file mode 100644 index 000000000000..2e11969316ee --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PrefixListGlobalRulestackResourceInner.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** GlobalRulestack prefixList. */ +@Fluent +public final class PrefixListGlobalRulestackResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private PrefixObject innerProperties = new PrefixObject(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of PrefixListGlobalRulestackResourceInner class. */ + public PrefixListGlobalRulestackResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private PrefixObject 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 description property: prefix description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: prefix description. + * + * @param description the description value to set. + * @return the PrefixListGlobalRulestackResourceInner object itself. + */ + public PrefixListGlobalRulestackResourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new PrefixObject(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the prefixList property: prefix list. + * + * @return the prefixList value. + */ + public List prefixList() { + return this.innerProperties() == null ? null : this.innerProperties().prefixList(); + } + + /** + * Set the prefixList property: prefix list. + * + * @param prefixList the prefixList value to set. + * @return the PrefixListGlobalRulestackResourceInner object itself. + */ + public PrefixListGlobalRulestackResourceInner withPrefixList(List prefixList) { + if (this.innerProperties() == null) { + this.innerProperties = new PrefixObject(); + } + this.innerProperties().withPrefixList(prefixList); + return this; + } + + /** + * Get the etag property: etag info. + * + * @return the etag value. + */ + public String etag() { + return this.innerProperties() == null ? null : this.innerProperties().etag(); + } + + /** + * Set the etag property: etag info. + * + * @param etag the etag value to set. + * @return the PrefixListGlobalRulestackResourceInner object itself. + */ + public PrefixListGlobalRulestackResourceInner withEtag(String etag) { + if (this.innerProperties() == null) { + this.innerProperties = new PrefixObject(); + } + this.innerProperties().withEtag(etag); + return this; + } + + /** + * Get the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.innerProperties() == null ? null : this.innerProperties().auditComment(); + } + + /** + * Set the auditComment property: comment for this object. + * + * @param auditComment the auditComment value to set. + * @return the PrefixListGlobalRulestackResourceInner object itself. + */ + public PrefixListGlobalRulestackResourceInner withAuditComment(String auditComment) { + if (this.innerProperties() == null) { + this.innerProperties = new PrefixObject(); + } + this.innerProperties().withAuditComment(auditComment); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + 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 + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model PrefixListGlobalRulestackResourceInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrefixListGlobalRulestackResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PrefixListResourceInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PrefixListResourceInner.java new file mode 100644 index 000000000000..6b138733a586 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PrefixListResourceInner.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** LocalRulestack prefixList. */ +@Fluent +public final class PrefixListResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties", required = true) + private PrefixObject innerProperties = new PrefixObject(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of PrefixListResourceInner class. */ + public PrefixListResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private PrefixObject 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 description property: prefix description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: prefix description. + * + * @param description the description value to set. + * @return the PrefixListResourceInner object itself. + */ + public PrefixListResourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new PrefixObject(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the prefixList property: prefix list. + * + * @return the prefixList value. + */ + public List prefixList() { + return this.innerProperties() == null ? null : this.innerProperties().prefixList(); + } + + /** + * Set the prefixList property: prefix list. + * + * @param prefixList the prefixList value to set. + * @return the PrefixListResourceInner object itself. + */ + public PrefixListResourceInner withPrefixList(List prefixList) { + if (this.innerProperties() == null) { + this.innerProperties = new PrefixObject(); + } + this.innerProperties().withPrefixList(prefixList); + return this; + } + + /** + * Get the etag property: etag info. + * + * @return the etag value. + */ + public String etag() { + return this.innerProperties() == null ? null : this.innerProperties().etag(); + } + + /** + * Set the etag property: etag info. + * + * @param etag the etag value to set. + * @return the PrefixListResourceInner object itself. + */ + public PrefixListResourceInner withEtag(String etag) { + if (this.innerProperties() == null) { + this.innerProperties = new PrefixObject(); + } + this.innerProperties().withEtag(etag); + return this; + } + + /** + * Get the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.innerProperties() == null ? null : this.innerProperties().auditComment(); + } + + /** + * Set the auditComment property: comment for this object. + * + * @param auditComment the auditComment value to set. + * @return the PrefixListResourceInner object itself. + */ + public PrefixListResourceInner withAuditComment(String auditComment) { + if (this.innerProperties() == null) { + this.innerProperties = new PrefixObject(); + } + this.innerProperties().withAuditComment(auditComment); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + 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 + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model PrefixListResourceInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrefixListResourceInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PrefixObject.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PrefixObject.java new file mode 100644 index 000000000000..378777458809 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/PrefixObject.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** prefix entry. */ +@Fluent +public final class PrefixObject { + /* + * prefix description + */ + @JsonProperty(value = "description") + private String description; + + /* + * prefix list + */ + @JsonProperty(value = "prefixList", required = true) + private List prefixList; + + /* + * etag info + */ + @JsonProperty(value = "etag") + private String etag; + + /* + * comment for this object + */ + @JsonProperty(value = "auditComment") + private String auditComment; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** Creates an instance of PrefixObject class. */ + public PrefixObject() { + } + + /** + * Get the description property: prefix description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: prefix description. + * + * @param description the description value to set. + * @return the PrefixObject object itself. + */ + public PrefixObject withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the prefixList property: prefix list. + * + * @return the prefixList value. + */ + public List prefixList() { + return this.prefixList; + } + + /** + * Set the prefixList property: prefix list. + * + * @param prefixList the prefixList value to set. + * @return the PrefixObject object itself. + */ + public PrefixObject withPrefixList(List prefixList) { + this.prefixList = prefixList; + return this; + } + + /** + * Get the etag property: etag info. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Set the etag property: etag info. + * + * @param etag the etag value to set. + * @return the PrefixObject object itself. + */ + public PrefixObject withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.auditComment; + } + + /** + * Set the auditComment property: comment for this object. + * + * @param auditComment the auditComment value to set. + * @return the PrefixObject object itself. + */ + public PrefixObject withAuditComment(String auditComment) { + this.auditComment = auditComment; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (prefixList() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property prefixList in model PrefixObject")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrefixObject.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RuleCounterInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RuleCounterInner.java new file mode 100644 index 000000000000..7a1d03d6dd08 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RuleCounterInner.java @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.models.AppSeenData; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Rule counter. */ +@Fluent +public final class RuleCounterInner { + /* + * priority number + */ + @JsonProperty(value = "priority", required = true) + private String priority; + + /* + * rule Stack Name + */ + @JsonProperty(value = "ruleStackName") + private String ruleStackName; + + /* + * rule list name + */ + @JsonProperty(value = "ruleListName") + private String ruleListName; + + /* + * firewall name + */ + @JsonProperty(value = "firewallName") + private String firewallName; + + /* + * rule name + */ + @JsonProperty(value = "ruleName", required = true) + private String ruleName; + + /* + * hit count + */ + @JsonProperty(value = "hitCount") + private Integer hitCount; + + /* + * apps seen + */ + @JsonProperty(value = "appSeen") + private AppSeenData appSeen; + + /* + * timestamp of response + */ + @JsonProperty(value = "timestamp") + private OffsetDateTime timestamp; + + /* + * timestamp of request + */ + @JsonProperty(value = "requestTimestamp") + private OffsetDateTime requestTimestamp; + + /* + * last updated timestamp + */ + @JsonProperty(value = "lastUpdatedTimestamp") + private OffsetDateTime lastUpdatedTimestamp; + + /** Creates an instance of RuleCounterInner class. */ + public RuleCounterInner() { + } + + /** + * Get the priority property: priority number. + * + * @return the priority value. + */ + public String priority() { + return this.priority; + } + + /** + * Set the priority property: priority number. + * + * @param priority the priority value to set. + * @return the RuleCounterInner object itself. + */ + public RuleCounterInner withPriority(String priority) { + this.priority = priority; + return this; + } + + /** + * Get the ruleStackName property: rule Stack Name. + * + * @return the ruleStackName value. + */ + public String ruleStackName() { + return this.ruleStackName; + } + + /** + * Set the ruleStackName property: rule Stack Name. + * + * @param ruleStackName the ruleStackName value to set. + * @return the RuleCounterInner object itself. + */ + public RuleCounterInner withRuleStackName(String ruleStackName) { + this.ruleStackName = ruleStackName; + return this; + } + + /** + * Get the ruleListName property: rule list name. + * + * @return the ruleListName value. + */ + public String ruleListName() { + return this.ruleListName; + } + + /** + * Set the ruleListName property: rule list name. + * + * @param ruleListName the ruleListName value to set. + * @return the RuleCounterInner object itself. + */ + public RuleCounterInner withRuleListName(String ruleListName) { + this.ruleListName = ruleListName; + return this; + } + + /** + * Get the firewallName property: firewall name. + * + * @return the firewallName value. + */ + public String firewallName() { + return this.firewallName; + } + + /** + * Set the firewallName property: firewall name. + * + * @param firewallName the firewallName value to set. + * @return the RuleCounterInner object itself. + */ + public RuleCounterInner withFirewallName(String firewallName) { + this.firewallName = firewallName; + return this; + } + + /** + * Get the ruleName property: rule name. + * + * @return the ruleName value. + */ + public String ruleName() { + return this.ruleName; + } + + /** + * Set the ruleName property: rule name. + * + * @param ruleName the ruleName value to set. + * @return the RuleCounterInner object itself. + */ + public RuleCounterInner withRuleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get the hitCount property: hit count. + * + * @return the hitCount value. + */ + public Integer hitCount() { + return this.hitCount; + } + + /** + * Set the hitCount property: hit count. + * + * @param hitCount the hitCount value to set. + * @return the RuleCounterInner object itself. + */ + public RuleCounterInner withHitCount(Integer hitCount) { + this.hitCount = hitCount; + return this; + } + + /** + * Get the appSeen property: apps seen. + * + * @return the appSeen value. + */ + public AppSeenData appSeen() { + return this.appSeen; + } + + /** + * Set the appSeen property: apps seen. + * + * @param appSeen the appSeen value to set. + * @return the RuleCounterInner object itself. + */ + public RuleCounterInner withAppSeen(AppSeenData appSeen) { + this.appSeen = appSeen; + return this; + } + + /** + * Get the timestamp property: timestamp of response. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: timestamp of response. + * + * @param timestamp the timestamp value to set. + * @return the RuleCounterInner object itself. + */ + public RuleCounterInner withTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the requestTimestamp property: timestamp of request. + * + * @return the requestTimestamp value. + */ + public OffsetDateTime requestTimestamp() { + return this.requestTimestamp; + } + + /** + * Set the requestTimestamp property: timestamp of request. + * + * @param requestTimestamp the requestTimestamp value to set. + * @return the RuleCounterInner object itself. + */ + public RuleCounterInner withRequestTimestamp(OffsetDateTime requestTimestamp) { + this.requestTimestamp = requestTimestamp; + return this; + } + + /** + * Get the lastUpdatedTimestamp property: last updated timestamp. + * + * @return the lastUpdatedTimestamp value. + */ + public OffsetDateTime lastUpdatedTimestamp() { + return this.lastUpdatedTimestamp; + } + + /** + * Set the lastUpdatedTimestamp property: last updated timestamp. + * + * @param lastUpdatedTimestamp the lastUpdatedTimestamp value to set. + * @return the RuleCounterInner object itself. + */ + public RuleCounterInner withLastUpdatedTimestamp(OffsetDateTime lastUpdatedTimestamp) { + this.lastUpdatedTimestamp = lastUpdatedTimestamp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (priority() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property priority in model RuleCounterInner")); + } + if (ruleName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property ruleName in model RuleCounterInner")); + } + if (appSeen() != null) { + appSeen().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RuleCounterInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RuleCounterResetInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RuleCounterResetInner.java new file mode 100644 index 000000000000..2acffd318a8e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RuleCounterResetInner.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Rule counter reset. */ +@Fluent +public final class RuleCounterResetInner { + /* + * priority number + */ + @JsonProperty(value = "priority", access = JsonProperty.Access.WRITE_ONLY) + private String priority; + + /* + * rule Stack Name + */ + @JsonProperty(value = "ruleStackName") + private String ruleStackName; + + /* + * rule list name + */ + @JsonProperty(value = "ruleListName") + private String ruleListName; + + /* + * firewall name + */ + @JsonProperty(value = "firewallName") + private String firewallName; + + /* + * rule name + */ + @JsonProperty(value = "ruleName") + private String ruleName; + + /** Creates an instance of RuleCounterResetInner class. */ + public RuleCounterResetInner() { + } + + /** + * Get the priority property: priority number. + * + * @return the priority value. + */ + public String priority() { + return this.priority; + } + + /** + * Get the ruleStackName property: rule Stack Name. + * + * @return the ruleStackName value. + */ + public String ruleStackName() { + return this.ruleStackName; + } + + /** + * Set the ruleStackName property: rule Stack Name. + * + * @param ruleStackName the ruleStackName value to set. + * @return the RuleCounterResetInner object itself. + */ + public RuleCounterResetInner withRuleStackName(String ruleStackName) { + this.ruleStackName = ruleStackName; + return this; + } + + /** + * Get the ruleListName property: rule list name. + * + * @return the ruleListName value. + */ + public String ruleListName() { + return this.ruleListName; + } + + /** + * Set the ruleListName property: rule list name. + * + * @param ruleListName the ruleListName value to set. + * @return the RuleCounterResetInner object itself. + */ + public RuleCounterResetInner withRuleListName(String ruleListName) { + this.ruleListName = ruleListName; + return this; + } + + /** + * Get the firewallName property: firewall name. + * + * @return the firewallName value. + */ + public String firewallName() { + return this.firewallName; + } + + /** + * Set the firewallName property: firewall name. + * + * @param firewallName the firewallName value to set. + * @return the RuleCounterResetInner object itself. + */ + public RuleCounterResetInner withFirewallName(String firewallName) { + this.firewallName = firewallName; + return this; + } + + /** + * Get the ruleName property: rule name. + * + * @return the ruleName value. + */ + public String ruleName() { + return this.ruleName; + } + + /** + * Set the ruleName property: rule name. + * + * @param ruleName the ruleName value to set. + * @return the RuleCounterResetInner object itself. + */ + public RuleCounterResetInner withRuleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RuleEntry.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RuleEntry.java new file mode 100644 index 000000000000..6c9389404f88 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RuleEntry.java @@ -0,0 +1,552 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** definition of rule. */ +@Fluent +public final class RuleEntry { + /* + * etag info + */ + @JsonProperty(value = "etag") + private String etag; + + /* + * rule name + */ + @JsonProperty(value = "ruleName", required = true) + private String ruleName; + + /* + * The priority property. + */ + @JsonProperty(value = "priority", access = JsonProperty.Access.WRITE_ONLY) + private Integer priority; + + /* + * rule description + */ + @JsonProperty(value = "description") + private String description; + + /* + * state of this rule + */ + @JsonProperty(value = "ruleState") + private StateEnum ruleState; + + /* + * source address + */ + @JsonProperty(value = "source") + private SourceAddr source; + + /* + * cidr should not be 'any' + */ + @JsonProperty(value = "negateSource") + private BooleanEnum negateSource; + + /* + * destination address + */ + @JsonProperty(value = "destination") + private DestinationAddr destination; + + /* + * cidr should not be 'any' + */ + @JsonProperty(value = "negateDestination") + private BooleanEnum negateDestination; + + /* + * array of rule applications + */ + @JsonProperty(value = "applications") + private List applications; + + /* + * rule category + */ + @JsonProperty(value = "category") + private Category category; + + /* + * any, application-default, TCP:number, UDP:number + */ + @JsonProperty(value = "protocol") + private String protocol; + + /* + * prot port list + */ + @JsonProperty(value = "protocolPortList") + private List protocolPortList; + + /* + * inbound Inspection Certificate + */ + @JsonProperty(value = "inboundInspectionCertificate") + private String inboundInspectionCertificate; + + /* + * rule comment + */ + @JsonProperty(value = "auditComment") + private String auditComment; + + /* + * rule action + */ + @JsonProperty(value = "actionType") + private ActionEnum actionType; + + /* + * enable or disable logging + */ + @JsonProperty(value = "enableLogging") + private StateEnum enableLogging; + + /* + * enable or disable decryption + */ + @JsonProperty(value = "decryptionRuleType") + private DecryptionRuleTypeEnum decryptionRuleType; + + /* + * tag for rule + */ + @JsonProperty(value = "tags") + private List tags; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** Creates an instance of RuleEntry class. */ + public RuleEntry() { + } + + /** + * Get the etag property: etag info. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Set the etag property: etag info. + * + * @param etag the etag value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the ruleName property: rule name. + * + * @return the ruleName value. + */ + public String ruleName() { + return this.ruleName; + } + + /** + * Set the ruleName property: rule name. + * + * @param ruleName the ruleName value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withRuleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get the priority property: The priority property. + * + * @return the priority value. + */ + public Integer priority() { + return this.priority; + } + + /** + * Get the description property: rule description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: rule description. + * + * @param description the description value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the ruleState property: state of this rule. + * + * @return the ruleState value. + */ + public StateEnum ruleState() { + return this.ruleState; + } + + /** + * Set the ruleState property: state of this rule. + * + * @param ruleState the ruleState value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withRuleState(StateEnum ruleState) { + this.ruleState = ruleState; + return this; + } + + /** + * Get the source property: source address. + * + * @return the source value. + */ + public SourceAddr source() { + return this.source; + } + + /** + * Set the source property: source address. + * + * @param source the source value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withSource(SourceAddr source) { + this.source = source; + return this; + } + + /** + * Get the negateSource property: cidr should not be 'any'. + * + * @return the negateSource value. + */ + public BooleanEnum negateSource() { + return this.negateSource; + } + + /** + * Set the negateSource property: cidr should not be 'any'. + * + * @param negateSource the negateSource value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withNegateSource(BooleanEnum negateSource) { + this.negateSource = negateSource; + return this; + } + + /** + * Get the destination property: destination address. + * + * @return the destination value. + */ + public DestinationAddr destination() { + return this.destination; + } + + /** + * Set the destination property: destination address. + * + * @param destination the destination value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withDestination(DestinationAddr destination) { + this.destination = destination; + return this; + } + + /** + * Get the negateDestination property: cidr should not be 'any'. + * + * @return the negateDestination value. + */ + public BooleanEnum negateDestination() { + return this.negateDestination; + } + + /** + * Set the negateDestination property: cidr should not be 'any'. + * + * @param negateDestination the negateDestination value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withNegateDestination(BooleanEnum negateDestination) { + this.negateDestination = negateDestination; + return this; + } + + /** + * Get the applications property: array of rule applications. + * + * @return the applications value. + */ + public List applications() { + return this.applications; + } + + /** + * Set the applications property: array of rule applications. + * + * @param applications the applications value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withApplications(List applications) { + this.applications = applications; + return this; + } + + /** + * Get the category property: rule category. + * + * @return the category value. + */ + public Category category() { + return this.category; + } + + /** + * Set the category property: rule category. + * + * @param category the category value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withCategory(Category category) { + this.category = category; + return this; + } + + /** + * Get the protocol property: any, application-default, TCP:number, UDP:number. + * + * @return the protocol value. + */ + public String protocol() { + return this.protocol; + } + + /** + * Set the protocol property: any, application-default, TCP:number, UDP:number. + * + * @param protocol the protocol value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the protocolPortList property: prot port list. + * + * @return the protocolPortList value. + */ + public List protocolPortList() { + return this.protocolPortList; + } + + /** + * Set the protocolPortList property: prot port list. + * + * @param protocolPortList the protocolPortList value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withProtocolPortList(List protocolPortList) { + this.protocolPortList = protocolPortList; + return this; + } + + /** + * Get the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @return the inboundInspectionCertificate value. + */ + public String inboundInspectionCertificate() { + return this.inboundInspectionCertificate; + } + + /** + * Set the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @param inboundInspectionCertificate the inboundInspectionCertificate value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withInboundInspectionCertificate(String inboundInspectionCertificate) { + this.inboundInspectionCertificate = inboundInspectionCertificate; + return this; + } + + /** + * Get the auditComment property: rule comment. + * + * @return the auditComment value. + */ + public String auditComment() { + return this.auditComment; + } + + /** + * Set the auditComment property: rule comment. + * + * @param auditComment the auditComment value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withAuditComment(String auditComment) { + this.auditComment = auditComment; + return this; + } + + /** + * Get the actionType property: rule action. + * + * @return the actionType value. + */ + public ActionEnum actionType() { + return this.actionType; + } + + /** + * Set the actionType property: rule action. + * + * @param actionType the actionType value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withActionType(ActionEnum actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the enableLogging property: enable or disable logging. + * + * @return the enableLogging value. + */ + public StateEnum enableLogging() { + return this.enableLogging; + } + + /** + * Set the enableLogging property: enable or disable logging. + * + * @param enableLogging the enableLogging value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withEnableLogging(StateEnum enableLogging) { + this.enableLogging = enableLogging; + return this; + } + + /** + * Get the decryptionRuleType property: enable or disable decryption. + * + * @return the decryptionRuleType value. + */ + public DecryptionRuleTypeEnum decryptionRuleType() { + return this.decryptionRuleType; + } + + /** + * Set the decryptionRuleType property: enable or disable decryption. + * + * @param decryptionRuleType the decryptionRuleType value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withDecryptionRuleType(DecryptionRuleTypeEnum decryptionRuleType) { + this.decryptionRuleType = decryptionRuleType; + return this; + } + + /** + * Get the tags property: tag for rule. + * + * @return the tags value. + */ + public List tags() { + return this.tags; + } + + /** + * Set the tags property: tag for rule. + * + * @param tags the tags value to set. + * @return the RuleEntry object itself. + */ + public RuleEntry withTags(List tags) { + this.tags = tags; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ruleName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property ruleName in model RuleEntry")); + } + if (source() != null) { + source().validate(); + } + if (destination() != null) { + destination().validate(); + } + if (category() != null) { + category().validate(); + } + if (tags() != null) { + tags().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RuleEntry.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RulestackProperties.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RulestackProperties.java new file mode 100644 index 000000000000..028aa538b98c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/RulestackProperties.java @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** PAN Rulestack Describe Object. */ +@Fluent +public final class RulestackProperties { + /* + * PanEtag info + */ + @JsonProperty(value = "panEtag") + private String panEtag; + + /* + * Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks + */ + @JsonProperty(value = "panLocation") + private String panLocation; + + /* + * Rulestack Type + */ + @JsonProperty(value = "scope") + private ScopeType scope; + + /* + * subscription scope of global rulestack + */ + @JsonProperty(value = "associatedSubscriptions") + private List associatedSubscriptions; + + /* + * rulestack description + */ + @JsonProperty(value = "description") + private String description; + + /* + * Mode for default rules creation + */ + @JsonProperty(value = "defaultMode") + private DefaultMode defaultMode; + + /* + * minimum version + */ + @JsonProperty(value = "minAppIdVersion") + private String minAppIdVersion; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Security Profile + */ + @JsonProperty(value = "securityServices") + private SecurityServices securityServices; + + /** Creates an instance of RulestackProperties class. */ + public RulestackProperties() { + } + + /** + * Get the panEtag property: PanEtag info. + * + * @return the panEtag value. + */ + public String panEtag() { + return this.panEtag; + } + + /** + * Set the panEtag property: PanEtag info. + * + * @param panEtag the panEtag value to set. + * @return the RulestackProperties object itself. + */ + public RulestackProperties withPanEtag(String panEtag) { + this.panEtag = panEtag; + return this; + } + + /** + * Get the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * + * @return the panLocation value. + */ + public String panLocation() { + return this.panLocation; + } + + /** + * Set the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * + * @param panLocation the panLocation value to set. + * @return the RulestackProperties object itself. + */ + public RulestackProperties withPanLocation(String panLocation) { + this.panLocation = panLocation; + return this; + } + + /** + * Get the scope property: Rulestack Type. + * + * @return the scope value. + */ + public ScopeType scope() { + return this.scope; + } + + /** + * Set the scope property: Rulestack Type. + * + * @param scope the scope value to set. + * @return the RulestackProperties object itself. + */ + public RulestackProperties withScope(ScopeType scope) { + this.scope = scope; + return this; + } + + /** + * Get the associatedSubscriptions property: subscription scope of global rulestack. + * + * @return the associatedSubscriptions value. + */ + public List associatedSubscriptions() { + return this.associatedSubscriptions; + } + + /** + * Set the associatedSubscriptions property: subscription scope of global rulestack. + * + * @param associatedSubscriptions the associatedSubscriptions value to set. + * @return the RulestackProperties object itself. + */ + public RulestackProperties withAssociatedSubscriptions(List associatedSubscriptions) { + this.associatedSubscriptions = associatedSubscriptions; + return this; + } + + /** + * Get the description property: rulestack description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: rulestack description. + * + * @param description the description value to set. + * @return the RulestackProperties object itself. + */ + public RulestackProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the defaultMode property: Mode for default rules creation. + * + * @return the defaultMode value. + */ + public DefaultMode defaultMode() { + return this.defaultMode; + } + + /** + * Set the defaultMode property: Mode for default rules creation. + * + * @param defaultMode the defaultMode value to set. + * @return the RulestackProperties object itself. + */ + public RulestackProperties withDefaultMode(DefaultMode defaultMode) { + this.defaultMode = defaultMode; + return this; + } + + /** + * Get the minAppIdVersion property: minimum version. + * + * @return the minAppIdVersion value. + */ + public String minAppIdVersion() { + return this.minAppIdVersion; + } + + /** + * Set the minAppIdVersion property: minimum version. + * + * @param minAppIdVersion the minAppIdVersion value to set. + * @return the RulestackProperties object itself. + */ + public RulestackProperties withMinAppIdVersion(String minAppIdVersion) { + this.minAppIdVersion = minAppIdVersion; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the securityServices property: Security Profile. + * + * @return the securityServices value. + */ + public SecurityServices securityServices() { + return this.securityServices; + } + + /** + * Set the securityServices property: Security Profile. + * + * @param securityServices the securityServices value to set. + * @return the RulestackProperties object itself. + */ + public RulestackProperties withSecurityServices(SecurityServices securityServices) { + this.securityServices = securityServices; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (securityServices() != null) { + securityServices().validate(); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/SecurityServicesResponseInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/SecurityServicesResponseInner.java new file mode 100644 index 000000000000..e37376e2c2ab --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/SecurityServicesResponseInner.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesTypeList; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Security services list response. */ +@Fluent +public final class SecurityServicesResponseInner { + /* + * response value + */ + @JsonProperty(value = "value", required = true) + private SecurityServicesTypeList value; + + /* + * next link + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of SecurityServicesResponseInner class. */ + public SecurityServicesResponseInner() { + } + + /** + * Get the value property: response value. + * + * @return the value value. + */ + public SecurityServicesTypeList value() { + return this.value; + } + + /** + * Set the value property: response value. + * + * @param value the value value to set. + * @return the SecurityServicesResponseInner object itself. + */ + public SecurityServicesResponseInner withValue(SecurityServicesTypeList value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: next link. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: next link. + * + * @param nextLink the nextLink value to set. + * @return the SecurityServicesResponseInner object itself. + */ + public SecurityServicesResponseInner 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model SecurityServicesResponseInner")); + } else { + value().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SecurityServicesResponseInner.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/SupportInfoInner.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/SupportInfoInner.java new file mode 100644 index 000000000000..d51e548e5950 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/SupportInfoInner.java @@ -0,0 +1,337 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Support information for the resource. */ +@Fluent +public final class SupportInfoInner { + /* + * product SKU associated with given resource + */ + @JsonProperty(value = "productSku") + private String productSku; + + /* + * product Serial associated with given resource + */ + @JsonProperty(value = "productSerial") + private String productSerial; + + /* + * account registered in Customer Support Portal + */ + @JsonProperty(value = "accountRegistered") + private BooleanEnum accountRegistered; + + /* + * Support account associated with given resource + */ + @JsonProperty(value = "accountId") + private String accountId; + + /* + * user domain is supported in Customer Support Portal + */ + @JsonProperty(value = "userDomainSupported") + private BooleanEnum userDomainSupported; + + /* + * user registered in Customer Support Portal + */ + @JsonProperty(value = "userRegistered") + private BooleanEnum userRegistered; + + /* + * Product usage is in free trial period + */ + @JsonProperty(value = "freeTrial") + private BooleanEnum freeTrial; + + /* + * Free trial days remaining + */ + @JsonProperty(value = "freeTrialDaysLeft") + private Integer freeTrialDaysLeft; + + /* + * Free trial credit remaining + */ + @JsonProperty(value = "freeTrialCreditLeft") + private Integer freeTrialCreditLeft; + + /* + * URL for paloaltonetworks live community + */ + @JsonProperty(value = "helpURL") + private String helpUrl; + + /* + * URL for paloaltonetworks Customer Service Portal + */ + @JsonProperty(value = "supportURL") + private String supportUrl; + + /* + * URL for registering product in paloaltonetworks Customer Service Portal + */ + @JsonProperty(value = "registerURL") + private String registerUrl; + + /** Creates an instance of SupportInfoInner class. */ + public SupportInfoInner() { + } + + /** + * Get the productSku property: product SKU associated with given resource. + * + * @return the productSku value. + */ + public String productSku() { + return this.productSku; + } + + /** + * Set the productSku property: product SKU associated with given resource. + * + * @param productSku the productSku value to set. + * @return the SupportInfoInner object itself. + */ + public SupportInfoInner withProductSku(String productSku) { + this.productSku = productSku; + return this; + } + + /** + * Get the productSerial property: product Serial associated with given resource. + * + * @return the productSerial value. + */ + public String productSerial() { + return this.productSerial; + } + + /** + * Set the productSerial property: product Serial associated with given resource. + * + * @param productSerial the productSerial value to set. + * @return the SupportInfoInner object itself. + */ + public SupportInfoInner withProductSerial(String productSerial) { + this.productSerial = productSerial; + return this; + } + + /** + * Get the accountRegistered property: account registered in Customer Support Portal. + * + * @return the accountRegistered value. + */ + public BooleanEnum accountRegistered() { + return this.accountRegistered; + } + + /** + * Set the accountRegistered property: account registered in Customer Support Portal. + * + * @param accountRegistered the accountRegistered value to set. + * @return the SupportInfoInner object itself. + */ + public SupportInfoInner withAccountRegistered(BooleanEnum accountRegistered) { + this.accountRegistered = accountRegistered; + return this; + } + + /** + * Get the accountId property: Support account associated with given resource. + * + * @return the accountId value. + */ + public String accountId() { + return this.accountId; + } + + /** + * Set the accountId property: Support account associated with given resource. + * + * @param accountId the accountId value to set. + * @return the SupportInfoInner object itself. + */ + public SupportInfoInner withAccountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get the userDomainSupported property: user domain is supported in Customer Support Portal. + * + * @return the userDomainSupported value. + */ + public BooleanEnum userDomainSupported() { + return this.userDomainSupported; + } + + /** + * Set the userDomainSupported property: user domain is supported in Customer Support Portal. + * + * @param userDomainSupported the userDomainSupported value to set. + * @return the SupportInfoInner object itself. + */ + public SupportInfoInner withUserDomainSupported(BooleanEnum userDomainSupported) { + this.userDomainSupported = userDomainSupported; + return this; + } + + /** + * Get the userRegistered property: user registered in Customer Support Portal. + * + * @return the userRegistered value. + */ + public BooleanEnum userRegistered() { + return this.userRegistered; + } + + /** + * Set the userRegistered property: user registered in Customer Support Portal. + * + * @param userRegistered the userRegistered value to set. + * @return the SupportInfoInner object itself. + */ + public SupportInfoInner withUserRegistered(BooleanEnum userRegistered) { + this.userRegistered = userRegistered; + return this; + } + + /** + * Get the freeTrial property: Product usage is in free trial period. + * + * @return the freeTrial value. + */ + public BooleanEnum freeTrial() { + return this.freeTrial; + } + + /** + * Set the freeTrial property: Product usage is in free trial period. + * + * @param freeTrial the freeTrial value to set. + * @return the SupportInfoInner object itself. + */ + public SupportInfoInner withFreeTrial(BooleanEnum freeTrial) { + this.freeTrial = freeTrial; + return this; + } + + /** + * Get the freeTrialDaysLeft property: Free trial days remaining. + * + * @return the freeTrialDaysLeft value. + */ + public Integer freeTrialDaysLeft() { + return this.freeTrialDaysLeft; + } + + /** + * Set the freeTrialDaysLeft property: Free trial days remaining. + * + * @param freeTrialDaysLeft the freeTrialDaysLeft value to set. + * @return the SupportInfoInner object itself. + */ + public SupportInfoInner withFreeTrialDaysLeft(Integer freeTrialDaysLeft) { + this.freeTrialDaysLeft = freeTrialDaysLeft; + return this; + } + + /** + * Get the freeTrialCreditLeft property: Free trial credit remaining. + * + * @return the freeTrialCreditLeft value. + */ + public Integer freeTrialCreditLeft() { + return this.freeTrialCreditLeft; + } + + /** + * Set the freeTrialCreditLeft property: Free trial credit remaining. + * + * @param freeTrialCreditLeft the freeTrialCreditLeft value to set. + * @return the SupportInfoInner object itself. + */ + public SupportInfoInner withFreeTrialCreditLeft(Integer freeTrialCreditLeft) { + this.freeTrialCreditLeft = freeTrialCreditLeft; + return this; + } + + /** + * Get the helpUrl property: URL for paloaltonetworks live community. + * + * @return the helpUrl value. + */ + public String helpUrl() { + return this.helpUrl; + } + + /** + * Set the helpUrl property: URL for paloaltonetworks live community. + * + * @param helpUrl the helpUrl value to set. + * @return the SupportInfoInner object itself. + */ + public SupportInfoInner withHelpUrl(String helpUrl) { + this.helpUrl = helpUrl; + return this; + } + + /** + * Get the supportUrl property: URL for paloaltonetworks Customer Service Portal. + * + * @return the supportUrl value. + */ + public String supportUrl() { + return this.supportUrl; + } + + /** + * Set the supportUrl property: URL for paloaltonetworks Customer Service Portal. + * + * @param supportUrl the supportUrl value to set. + * @return the SupportInfoInner object itself. + */ + public SupportInfoInner withSupportUrl(String supportUrl) { + this.supportUrl = supportUrl; + return this; + } + + /** + * Get the registerUrl property: URL for registering product in paloaltonetworks Customer Service Portal. + * + * @return the registerUrl value. + */ + public String registerUrl() { + return this.registerUrl; + } + + /** + * Set the registerUrl property: URL for registering product in paloaltonetworks Customer Service Portal. + * + * @param registerUrl the registerUrl value to set. + * @return the SupportInfoInner object itself. + */ + public SupportInfoInner withRegisterUrl(String registerUrl) { + this.registerUrl = registerUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/package-info.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/package-info.java new file mode 100644 index 000000000000..3dfde35ba871 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the inner data models for PaloAltoNetworksCloudngfw. null. */ +package com.azure.resourcemanager.paloaltonetworks.fluent.models; diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/package-info.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/package-info.java new file mode 100644 index 000000000000..cb863223a772 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/fluent/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the service clients for PaloAltoNetworksCloudngfw. null. */ +package com.azure.resourcemanager.paloaltonetworks.fluent; diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/AdvSecurityObjectListResponseImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/AdvSecurityObjectListResponseImpl.java new file mode 100644 index 000000000000..d7c239b70423 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/AdvSecurityObjectListResponseImpl.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.AdvSecurityObjectListResponseInner; +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectListResponse; +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectModel; + +public final class AdvSecurityObjectListResponseImpl implements AdvSecurityObjectListResponse { + private AdvSecurityObjectListResponseInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + AdvSecurityObjectListResponseImpl( + AdvSecurityObjectListResponseInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public AdvSecurityObjectModel value() { + return this.innerModel().value(); + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public AdvSecurityObjectListResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectGlobalRulestackResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectGlobalRulestackResourceImpl.java new file mode 100644 index 000000000000..d743d45ec35e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectGlobalRulestackResourceImpl.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectGlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.CertificateObjectGlobalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; + +public final class CertificateObjectGlobalRulestackResourceImpl implements CertificateObjectGlobalRulestackResource { + private CertificateObjectGlobalRulestackResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + CertificateObjectGlobalRulestackResourceImpl( + CertificateObjectGlobalRulestackResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = 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 String certificateSignerResourceId() { + return this.innerModel().certificateSignerResourceId(); + } + + public BooleanEnum certificateSelfSigned() { + return this.innerModel().certificateSelfSigned(); + } + + public String auditComment() { + return this.innerModel().auditComment(); + } + + public String description() { + return this.innerModel().description(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public CertificateObjectGlobalRulestackResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectGlobalRulestacksClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectGlobalRulestacksClientImpl.java new file mode 100644 index 000000000000..73ffb76fde25 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectGlobalRulestacksClientImpl.java @@ -0,0 +1,968 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.PathParam; +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.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.paloaltonetworks.fluent.CertificateObjectGlobalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectGlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.CertificateObjectGlobalRulestackResourceListResult; +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 CertificateObjectGlobalRulestacksClient. + */ +public final class CertificateObjectGlobalRulestacksClientImpl implements CertificateObjectGlobalRulestacksClient { + /** The proxy service used to perform REST calls. */ + private final CertificateObjectGlobalRulestacksService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of CertificateObjectGlobalRulestacksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CertificateObjectGlobalRulestacksClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy + .create( + CertificateObjectGlobalRulestacksService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwCertificateObjectGlobalRulestacks to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface CertificateObjectGlobalRulestacksService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("name") String name, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("name") String name, + @BodyParam("application/json") CertificateObjectGlobalRulestackResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("name") String name, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List CertificateObjectGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectGlobalRulestackResource list operation along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String globalRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + 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 CertificateObjectGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectGlobalRulestackResource list operation along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String globalRulestackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName 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(), globalRulestackName, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List CertificateObjectGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectGlobalRulestackResource list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String globalRulestackName) { + return new PagedFlux<>( + () -> listSinglePageAsync(globalRulestackName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List CertificateObjectGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectGlobalRulestackResource list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String globalRulestackName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(globalRulestackName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List CertificateObjectGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectGlobalRulestackResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String globalRulestackName) { + return new PagedIterable<>(listAsync(globalRulestackName)); + } + + /** + * List CertificateObjectGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectGlobalRulestackResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String globalRulestackName, Context context) { + return new PagedIterable<>(listAsync(globalRulestackName, context)); + } + + /** + * Get a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CertificateObjectGlobalRulestackResource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String globalRulestackName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CertificateObjectGlobalRulestackResource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String globalRulestackName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get(this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, name, accept, context); + } + + /** + * Get a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CertificateObjectGlobalRulestackResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String globalRulestackName, String name) { + return getWithResponseAsync(globalRulestackName, name).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CertificateObjectGlobalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String globalRulestackName, String name, Context context) { + return getWithResponseAsync(globalRulestackName, name, context).block(); + } + + /** + * Get a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CertificateObjectGlobalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateObjectGlobalRulestackResourceInner get(String globalRulestackName, String name) { + return getWithResponse(globalRulestackName, name, Context.NONE).getValue(); + } + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String globalRulestackName, String name, CertificateObjectGlobalRulestackResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + name, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String globalRulestackName, + String name, + CertificateObjectGlobalRulestackResourceInner resource, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + name, + resource, + accept, + context); + } + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CertificateObjectGlobalRulestackResourceInner> + beginCreateOrUpdateAsync( + String globalRulestackName, String name, CertificateObjectGlobalRulestackResourceInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(globalRulestackName, name, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CertificateObjectGlobalRulestackResourceInner.class, + CertificateObjectGlobalRulestackResourceInner.class, + this.client.getContext()); + } + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 PollerFlux} for polling of globalRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CertificateObjectGlobalRulestackResourceInner> + beginCreateOrUpdateAsync( + String globalRulestackName, + String name, + CertificateObjectGlobalRulestackResourceInner resource, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(globalRulestackName, name, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CertificateObjectGlobalRulestackResourceInner.class, + CertificateObjectGlobalRulestackResourceInner.class, + context); + } + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CertificateObjectGlobalRulestackResourceInner> + beginCreateOrUpdate( + String globalRulestackName, String name, CertificateObjectGlobalRulestackResourceInner resource) { + return this.beginCreateOrUpdateAsync(globalRulestackName, name, resource).getSyncPoller(); + } + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CertificateObjectGlobalRulestackResourceInner> + beginCreateOrUpdate( + String globalRulestackName, + String name, + CertificateObjectGlobalRulestackResourceInner resource, + Context context) { + return this.beginCreateOrUpdateAsync(globalRulestackName, name, resource, context).getSyncPoller(); + } + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String globalRulestackName, String name, CertificateObjectGlobalRulestackResourceInner resource) { + return beginCreateOrUpdateAsync(globalRulestackName, name, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String globalRulestackName, + String name, + CertificateObjectGlobalRulestackResourceInner resource, + Context context) { + return beginCreateOrUpdateAsync(globalRulestackName, name, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateObjectGlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, String name, CertificateObjectGlobalRulestackResourceInner resource) { + return createOrUpdateAsync(globalRulestackName, name, resource).block(); + } + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateObjectGlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, + String name, + CertificateObjectGlobalRulestackResourceInner resource, + Context context) { + return createOrUpdateAsync(globalRulestackName, name, resource, context).block(); + } + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete(this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, name, accept, context); + } + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String name) { + Mono>> mono = deleteWithResponseAsync(globalRulestackName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(globalRulestackName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 globalRulestackName, String name) { + return this.beginDeleteAsync(globalRulestackName, name).getSyncPoller(); + } + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 globalRulestackName, String name, Context context) { + return this.beginDeleteAsync(globalRulestackName, name, context).getSyncPoller(); + } + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 globalRulestackName, String name) { + return beginDeleteAsync(globalRulestackName, name).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 globalRulestackName, String name, Context context) { + return beginDeleteAsync(globalRulestackName, name, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 globalRulestackName, String name) { + deleteAsync(globalRulestackName, name).block(); + } + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 globalRulestackName, String name, Context context) { + deleteAsync(globalRulestackName, name, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectGlobalRulestackResource list operation along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @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(), + 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectGlobalRulestackResource list operation along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @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.")); + } + 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)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectGlobalRulestacksImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectGlobalRulestacksImpl.java new file mode 100644 index 000000000000..d6b884176ac9 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectGlobalRulestacksImpl.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.CertificateObjectGlobalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectGlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.CertificateObjectGlobalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.CertificateObjectGlobalRulestacks; + +public final class CertificateObjectGlobalRulestacksImpl implements CertificateObjectGlobalRulestacks { + private static final ClientLogger LOGGER = new ClientLogger(CertificateObjectGlobalRulestacksImpl.class); + + private final CertificateObjectGlobalRulestacksClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public CertificateObjectGlobalRulestacksImpl( + CertificateObjectGlobalRulestacksClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String globalRulestackName) { + PagedIterable inner = + this.serviceClient().list(globalRulestackName); + return Utils.mapPage(inner, inner1 -> new CertificateObjectGlobalRulestackResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String globalRulestackName, Context context) { + PagedIterable inner = + this.serviceClient().list(globalRulestackName, context); + return Utils.mapPage(inner, inner1 -> new CertificateObjectGlobalRulestackResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String globalRulestackName, String name, Context context) { + Response inner = + this.serviceClient().getWithResponse(globalRulestackName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CertificateObjectGlobalRulestackResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CertificateObjectGlobalRulestackResource get(String globalRulestackName, String name) { + CertificateObjectGlobalRulestackResourceInner inner = this.serviceClient().get(globalRulestackName, name); + if (inner != null) { + return new CertificateObjectGlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public CertificateObjectGlobalRulestackResource createOrUpdate( + String globalRulestackName, String name, CertificateObjectGlobalRulestackResourceInner resource) { + CertificateObjectGlobalRulestackResourceInner inner = + this.serviceClient().createOrUpdate(globalRulestackName, name, resource); + if (inner != null) { + return new CertificateObjectGlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public CertificateObjectGlobalRulestackResource createOrUpdate( + String globalRulestackName, + String name, + CertificateObjectGlobalRulestackResourceInner resource, + Context context) { + CertificateObjectGlobalRulestackResourceInner inner = + this.serviceClient().createOrUpdate(globalRulestackName, name, resource, context); + if (inner != null) { + return new CertificateObjectGlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String globalRulestackName, String name) { + this.serviceClient().delete(globalRulestackName, name); + } + + public void delete(String globalRulestackName, String name, Context context) { + this.serviceClient().delete(globalRulestackName, name, context); + } + + private CertificateObjectGlobalRulestacksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectLocalRulestackResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectLocalRulestackResourceImpl.java new file mode 100644 index 000000000000..d1e77555fe3e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectLocalRulestackResourceImpl.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectLocalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.CertificateObjectLocalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; + +public final class CertificateObjectLocalRulestackResourceImpl + implements CertificateObjectLocalRulestackResource, + CertificateObjectLocalRulestackResource.Definition, + CertificateObjectLocalRulestackResource.Update { + private CertificateObjectLocalRulestackResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager 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 String certificateSignerResourceId() { + return this.innerModel().certificateSignerResourceId(); + } + + public BooleanEnum certificateSelfSigned() { + return this.innerModel().certificateSelfSigned(); + } + + public String auditComment() { + return this.innerModel().auditComment(); + } + + public String description() { + return this.innerModel().description(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public CertificateObjectLocalRulestackResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String localRulestackName; + + private String name; + + public CertificateObjectLocalRulestackResourceImpl withExistingLocalRulestack( + String resourceGroupName, String localRulestackName) { + this.resourceGroupName = resourceGroupName; + this.localRulestackName = localRulestackName; + return this; + } + + public CertificateObjectLocalRulestackResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getCertificateObjectLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, name, this.innerModel(), Context.NONE); + return this; + } + + public CertificateObjectLocalRulestackResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCertificateObjectLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, name, this.innerModel(), context); + return this; + } + + CertificateObjectLocalRulestackResourceImpl( + String name, com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = new CertificateObjectLocalRulestackResourceInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public CertificateObjectLocalRulestackResourceImpl update() { + return this; + } + + public CertificateObjectLocalRulestackResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getCertificateObjectLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, name, this.innerModel(), Context.NONE); + return this; + } + + public CertificateObjectLocalRulestackResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCertificateObjectLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, name, this.innerModel(), context); + return this; + } + + CertificateObjectLocalRulestackResourceImpl( + CertificateObjectLocalRulestackResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.localRulestackName = Utils.getValueFromIdByName(innerObject.id(), "localRulestacks"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "certificates"); + } + + public CertificateObjectLocalRulestackResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getCertificateObjectLocalRulestacks() + .getWithResponse(resourceGroupName, localRulestackName, name, Context.NONE) + .getValue(); + return this; + } + + public CertificateObjectLocalRulestackResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCertificateObjectLocalRulestacks() + .getWithResponse(resourceGroupName, localRulestackName, name, context) + .getValue(); + return this; + } + + public CertificateObjectLocalRulestackResourceImpl withCertificateSelfSigned(BooleanEnum certificateSelfSigned) { + this.innerModel().withCertificateSelfSigned(certificateSelfSigned); + return this; + } + + public CertificateObjectLocalRulestackResourceImpl withCertificateSignerResourceId( + String certificateSignerResourceId) { + this.innerModel().withCertificateSignerResourceId(certificateSignerResourceId); + return this; + } + + public CertificateObjectLocalRulestackResourceImpl withAuditComment(String auditComment) { + this.innerModel().withAuditComment(auditComment); + return this; + } + + public CertificateObjectLocalRulestackResourceImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public CertificateObjectLocalRulestackResourceImpl withEtag(String etag) { + this.innerModel().withEtag(etag); + return this; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectLocalRulestacksClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectLocalRulestacksClientImpl.java new file mode 100644 index 000000000000..3e6841d32de7 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectLocalRulestacksClientImpl.java @@ -0,0 +1,1161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.PathParam; +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.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.paloaltonetworks.fluent.CertificateObjectLocalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectLocalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.CertificateObjectLocalRulestackResourceListResult; +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 CertificateObjectLocalRulestacksClient. + */ +public final class CertificateObjectLocalRulestacksClientImpl implements CertificateObjectLocalRulestacksClient { + /** The proxy service used to perform REST calls. */ + private final CertificateObjectLocalRulestacksService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of CertificateObjectLocalRulestacksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CertificateObjectLocalRulestacksClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy + .create( + CertificateObjectLocalRulestacksService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwCertificateObjectLocalRulestacks to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface CertificateObjectLocalRulestacksService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocalRulestacks( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("name") String name, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("name") String name, + @BodyParam("application/json") CertificateObjectLocalRulestackResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("name") String name, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocalRulestacksNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List CertificateObjectLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectLocalRulestackResource list operation along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksSinglePageAsync( + String resourceGroupName, String localRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByLocalRulestacks( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + 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 CertificateObjectLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectLocalRulestackResource list operation along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksSinglePageAsync( + String resourceGroupName, String localRulestackName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByLocalRulestacks( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List CertificateObjectLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectLocalRulestackResource list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocalRulestacksAsync( + String resourceGroupName, String localRulestackName) { + return new PagedFlux<>( + () -> listByLocalRulestacksSinglePageAsync(resourceGroupName, localRulestackName), + nextLink -> listByLocalRulestacksNextSinglePageAsync(nextLink)); + } + + /** + * List CertificateObjectLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectLocalRulestackResource list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocalRulestacksAsync( + String resourceGroupName, String localRulestackName, Context context) { + return new PagedFlux<>( + () -> listByLocalRulestacksSinglePageAsync(resourceGroupName, localRulestackName, context), + nextLink -> listByLocalRulestacksNextSinglePageAsync(nextLink, context)); + } + + /** + * List CertificateObjectLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectLocalRulestackResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName) { + return new PagedIterable<>(listByLocalRulestacksAsync(resourceGroupName, localRulestackName)); + } + + /** + * List CertificateObjectLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectLocalRulestackResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context) { + return new PagedIterable<>(listByLocalRulestacksAsync(resourceGroupName, localRulestackName, context)); + } + + /** + * Get a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CertificateObjectLocalRulestackResource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String localRulestackName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CertificateObjectLocalRulestackResource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String localRulestackName, String name, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + accept, + context); + } + + /** + * Get a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CertificateObjectLocalRulestackResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String localRulestackName, String name) { + return getWithResponseAsync(resourceGroupName, localRulestackName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CertificateObjectLocalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String localRulestackName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, localRulestackName, name, context).block(); + } + + /** + * Get a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CertificateObjectLocalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateObjectLocalRulestackResourceInner get( + String resourceGroupName, String localRulestackName, String name) { + return getWithResponse(resourceGroupName, localRulestackName, name, Context.NONE).getValue(); + } + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource, + 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + resource, + accept, + context); + } + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CertificateObjectLocalRulestackResourceInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, localRulestackName, name, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CertificateObjectLocalRulestackResourceInner.class, + CertificateObjectLocalRulestackResourceInner.class, + this.client.getContext()); + } + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 PollerFlux} for polling of localRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CertificateObjectLocalRulestackResourceInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, localRulestackName, name, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CertificateObjectLocalRulestackResourceInner.class, + CertificateObjectLocalRulestackResourceInner.class, + context); + } + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CertificateObjectLocalRulestackResourceInner> + beginCreateOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, name, resource).getSyncPoller(); + } + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CertificateObjectLocalRulestackResourceInner> + beginCreateOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, name, resource, context) + .getSyncPoller(); + } + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, name, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, name, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateObjectLocalRulestackResourceInner createOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource) { + return createOrUpdateAsync(resourceGroupName, localRulestackName, name, resource).block(); + } + + /** + * Create a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param resource 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 localRulestack Certificate Object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateObjectLocalRulestackResourceInner createOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + CertificateObjectLocalRulestackResourceInner resource, + Context context) { + return createOrUpdateAsync(resourceGroupName, localRulestackName, name, resource, context).block(); + } + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String name, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + accept, + context); + } + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, localRulestackName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, localRulestackName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 localRulestackName, String name) { + return this.beginDeleteAsync(resourceGroupName, localRulestackName, name).getSyncPoller(); + } + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 localRulestackName, String name, Context context) { + return this.beginDeleteAsync(resourceGroupName, localRulestackName, name, context).getSyncPoller(); + } + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 localRulestackName, String name) { + return beginDeleteAsync(resourceGroupName, localRulestackName, name) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 localRulestackName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, localRulestackName, name, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 localRulestackName, String name) { + deleteAsync(resourceGroupName, localRulestackName, name).block(); + } + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 localRulestackName, String name, Context context) { + deleteAsync(resourceGroupName, localRulestackName, name, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectLocalRulestackResource list operation along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksNextSinglePageAsync( + 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.listByLocalRulestacksNext(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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 CertificateObjectLocalRulestackResource list operation along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksNextSinglePageAsync( + 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 + .listByLocalRulestacksNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectLocalRulestacksImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectLocalRulestacksImpl.java new file mode 100644 index 000000000000..fe4385f28b66 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CertificateObjectLocalRulestacksImpl.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.CertificateObjectLocalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectLocalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.CertificateObjectLocalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.CertificateObjectLocalRulestacks; + +public final class CertificateObjectLocalRulestacksImpl implements CertificateObjectLocalRulestacks { + private static final ClientLogger LOGGER = new ClientLogger(CertificateObjectLocalRulestacksImpl.class); + + private final CertificateObjectLocalRulestacksClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public CertificateObjectLocalRulestacksImpl( + CertificateObjectLocalRulestacksClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName) { + PagedIterable inner = + this.serviceClient().listByLocalRulestacks(resourceGroupName, localRulestackName); + return Utils.mapPage(inner, inner1 -> new CertificateObjectLocalRulestackResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context) { + PagedIterable inner = + this.serviceClient().listByLocalRulestacks(resourceGroupName, localRulestackName, context); + return Utils.mapPage(inner, inner1 -> new CertificateObjectLocalRulestackResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String localRulestackName, String name, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, localRulestackName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CertificateObjectLocalRulestackResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CertificateObjectLocalRulestackResource get( + String resourceGroupName, String localRulestackName, String name) { + CertificateObjectLocalRulestackResourceInner inner = + this.serviceClient().get(resourceGroupName, localRulestackName, name); + if (inner != null) { + return new CertificateObjectLocalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String localRulestackName, String name) { + this.serviceClient().delete(resourceGroupName, localRulestackName, name); + } + + public void delete(String resourceGroupName, String localRulestackName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, localRulestackName, name, context); + } + + public CertificateObjectLocalRulestackResource getById(String id) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String name = Utils.getValueFromIdByName(id, "certificates"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + return this.getWithResponse(resourceGroupName, localRulestackName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String name = Utils.getValueFromIdByName(id, "certificates"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + return this.getWithResponse(resourceGroupName, localRulestackName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String name = Utils.getValueFromIdByName(id, "certificates"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + this.delete(resourceGroupName, localRulestackName, name, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String name = Utils.getValueFromIdByName(id, "certificates"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + this.delete(resourceGroupName, localRulestackName, name, context); + } + + private CertificateObjectLocalRulestacksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } + + public CertificateObjectLocalRulestackResourceImpl define(String name) { + return new CertificateObjectLocalRulestackResourceImpl(name, this.manager()); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/ChangelogImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/ChangelogImpl.java new file mode 100644 index 000000000000..8a17e2fdb14c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/ChangelogImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ChangelogInner; +import com.azure.resourcemanager.paloaltonetworks.models.Changelog; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class ChangelogImpl implements Changelog { + private ChangelogInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + ChangelogImpl( + ChangelogInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List changes() { + List inner = this.innerModel().changes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OffsetDateTime lastCommitted() { + return this.innerModel().lastCommitted(); + } + + public OffsetDateTime lastModified() { + return this.innerModel().lastModified(); + } + + public ChangelogInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CountriesResponseImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CountriesResponseImpl.java new file mode 100644 index 000000000000..f50f93bd9a61 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/CountriesResponseImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CountriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.models.CountriesResponse; +import com.azure.resourcemanager.paloaltonetworks.models.Country; +import java.util.Collections; +import java.util.List; + +public final class CountriesResponseImpl implements CountriesResponse { + private CountriesResponseInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + CountriesResponseImpl( + CountriesResponseInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public CountriesResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallResourceImpl.java new file mode 100644 index 000000000000..b37cbe1960a3 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallResourceImpl.java @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FirewallResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LogSettingsInner; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DnsSettings; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallResource; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallResourceUpdate; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallResourceUpdateProperties; +import com.azure.resourcemanager.paloaltonetworks.models.FrontendSetting; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackInfo; +import com.azure.resourcemanager.paloaltonetworks.models.LogSettings; +import com.azure.resourcemanager.paloaltonetworks.models.MarketplaceDetails; +import com.azure.resourcemanager.paloaltonetworks.models.NetworkProfile; +import com.azure.resourcemanager.paloaltonetworks.models.PanoramaConfig; +import com.azure.resourcemanager.paloaltonetworks.models.PlanData; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.RulestackDetails; +import com.azure.resourcemanager.paloaltonetworks.models.SupportInfo; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class FirewallResourceImpl + implements FirewallResource, FirewallResource.Definition, FirewallResource.Update { + private FirewallResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager 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 AzureResourceManagerManagedIdentityProperties identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String panEtag() { + return this.innerModel().panEtag(); + } + + public NetworkProfile networkProfile() { + return this.innerModel().networkProfile(); + } + + public BooleanEnum isPanoramaManaged() { + return this.innerModel().isPanoramaManaged(); + } + + public PanoramaConfig panoramaConfig() { + return this.innerModel().panoramaConfig(); + } + + public RulestackDetails associatedRulestack() { + return this.innerModel().associatedRulestack(); + } + + public DnsSettings dnsSettings() { + return this.innerModel().dnsSettings(); + } + + public List frontEndSettings() { + List inner = this.innerModel().frontEndSettings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PlanData planData() { + return this.innerModel().planData(); + } + + public MarketplaceDetails marketplaceDetails() { + return this.innerModel().marketplaceDetails(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public FirewallResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String firewallName; + + private FirewallResourceUpdate updateProperties; + + public FirewallResourceImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public FirewallResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getFirewalls() + .createOrUpdate(resourceGroupName, firewallName, this.innerModel(), Context.NONE); + return this; + } + + public FirewallResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFirewalls() + .createOrUpdate(resourceGroupName, firewallName, this.innerModel(), context); + return this; + } + + FirewallResourceImpl( + String name, com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = new FirewallResourceInner(); + this.serviceManager = serviceManager; + this.firewallName = name; + } + + public FirewallResourceImpl update() { + this.updateProperties = new FirewallResourceUpdate(); + return this; + } + + public FirewallResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getFirewalls() + .updateWithResponse(resourceGroupName, firewallName, updateProperties, Context.NONE) + .getValue(); + return this; + } + + public FirewallResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFirewalls() + .updateWithResponse(resourceGroupName, firewallName, updateProperties, context) + .getValue(); + return this; + } + + FirewallResourceImpl( + FirewallResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.firewallName = Utils.getValueFromIdByName(innerObject.id(), "firewalls"); + } + + public FirewallResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getFirewalls() + .getByResourceGroupWithResponse(resourceGroupName, firewallName, Context.NONE) + .getValue(); + return this; + } + + public FirewallResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFirewalls() + .getByResourceGroupWithResponse(resourceGroupName, firewallName, context) + .getValue(); + return this; + } + + public Response getGlobalRulestackWithResponse(Context context) { + return serviceManager.firewalls().getGlobalRulestackWithResponse(resourceGroupName, firewallName, context); + } + + public GlobalRulestackInfo getGlobalRulestack() { + return serviceManager.firewalls().getGlobalRulestack(resourceGroupName, firewallName); + } + + public Response getLogProfileWithResponse(Context context) { + return serviceManager.firewalls().getLogProfileWithResponse(resourceGroupName, firewallName, context); + } + + public LogSettings getLogProfile() { + return serviceManager.firewalls().getLogProfile(resourceGroupName, firewallName); + } + + public Response getSupportInfoWithResponse(String email, Context context) { + return serviceManager.firewalls().getSupportInfoWithResponse(resourceGroupName, firewallName, email, context); + } + + public SupportInfo getSupportInfo() { + return serviceManager.firewalls().getSupportInfo(resourceGroupName, firewallName); + } + + public Response saveLogProfileWithResponse(LogSettingsInner logSettings, Context context) { + return serviceManager + .firewalls() + .saveLogProfileWithResponse(resourceGroupName, firewallName, logSettings, context); + } + + public void saveLogProfile() { + serviceManager.firewalls().saveLogProfile(resourceGroupName, firewallName); + } + + public FirewallResourceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public FirewallResourceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public FirewallResourceImpl withNetworkProfile(NetworkProfile networkProfile) { + this.innerModel().withNetworkProfile(networkProfile); + return this; + } + + public FirewallResourceImpl withDnsSettings(DnsSettings dnsSettings) { + this.innerModel().withDnsSettings(dnsSettings); + return this; + } + + public FirewallResourceImpl withPlanData(PlanData planData) { + this.innerModel().withPlanData(planData); + return this; + } + + public FirewallResourceImpl withMarketplaceDetails(MarketplaceDetails marketplaceDetails) { + this.innerModel().withMarketplaceDetails(marketplaceDetails); + return this; + } + + public FirewallResourceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public FirewallResourceImpl withIdentity(AzureResourceManagerManagedIdentityProperties identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateProperties.withIdentity(identity); + return this; + } + } + + public FirewallResourceImpl withPanEtag(String panEtag) { + this.innerModel().withPanEtag(panEtag); + return this; + } + + public FirewallResourceImpl withIsPanoramaManaged(BooleanEnum isPanoramaManaged) { + this.innerModel().withIsPanoramaManaged(isPanoramaManaged); + return this; + } + + public FirewallResourceImpl withPanoramaConfig(PanoramaConfig panoramaConfig) { + this.innerModel().withPanoramaConfig(panoramaConfig); + return this; + } + + public FirewallResourceImpl withAssociatedRulestack(RulestackDetails associatedRulestack) { + this.innerModel().withAssociatedRulestack(associatedRulestack); + return this; + } + + public FirewallResourceImpl withFrontEndSettings(List frontEndSettings) { + this.innerModel().withFrontEndSettings(frontEndSettings); + return this; + } + + public FirewallResourceImpl withProperties(FirewallResourceUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallStatusClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallStatusClientImpl.java new file mode 100644 index 000000000000..d0ed7f2ed6b2 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallStatusClientImpl.java @@ -0,0 +1,496 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +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.PathParam; +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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.paloaltonetworks.fluent.FirewallStatusClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FirewallStatusResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallStatusResourceListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in FirewallStatusClient. */ +public final class FirewallStatusClientImpl implements FirewallStatusClient { + /** The proxy service used to perform REST calls. */ + private final FirewallStatusService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of FirewallStatusClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FirewallStatusClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy.create(FirewallStatusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwFirewallStatus to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface FirewallStatusService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/statuses") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirewalls( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/statuses/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirewallsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List FirewallStatusResource resources by Firewalls. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallStatusResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirewallsSinglePageAsync( + String resourceGroupName, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByFirewalls( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + 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 FirewallStatusResource resources by Firewalls. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallStatusResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirewallsSinglePageAsync( + String resourceGroupName, String firewallName, 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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByFirewalls( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List FirewallStatusResource resources by Firewalls. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallStatusResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirewallsAsync(String resourceGroupName, String firewallName) { + return new PagedFlux<>( + () -> listByFirewallsSinglePageAsync(resourceGroupName, firewallName), + nextLink -> listByFirewallsNextSinglePageAsync(nextLink)); + } + + /** + * List FirewallStatusResource resources by Firewalls. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallStatusResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirewallsAsync( + String resourceGroupName, String firewallName, Context context) { + return new PagedFlux<>( + () -> listByFirewallsSinglePageAsync(resourceGroupName, firewallName, context), + nextLink -> listByFirewallsNextSinglePageAsync(nextLink, context)); + } + + /** + * List FirewallStatusResource resources by Firewalls. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallStatusResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirewalls(String resourceGroupName, String firewallName) { + return new PagedIterable<>(listByFirewallsAsync(resourceGroupName, firewallName)); + } + + /** + * List FirewallStatusResource resources by Firewalls. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallStatusResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirewalls( + String resourceGroupName, String firewallName, Context context) { + return new PagedIterable<>(listByFirewallsAsync(resourceGroupName, firewallName, context)); + } + + /** + * Get a FirewallStatusResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FirewallStatusResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a FirewallStatusResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FirewallStatusResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String firewallName, 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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + accept, + context); + } + + /** + * Get a FirewallStatusResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FirewallStatusResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String firewallName) { + return getWithResponseAsync(resourceGroupName, firewallName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a FirewallStatusResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FirewallStatusResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String firewallName, Context context) { + return getWithResponseAsync(resourceGroupName, firewallName, context).block(); + } + + /** + * Get a FirewallStatusResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FirewallStatusResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FirewallStatusResourceInner get(String resourceGroupName, String firewallName) { + return getWithResponse(resourceGroupName, firewallName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallStatusResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirewallsNextSinglePageAsync(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.listByFirewallsNext(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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallStatusResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirewallsNextSinglePageAsync( + 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 + .listByFirewallsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallStatusImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallStatusImpl.java new file mode 100644 index 000000000000..cada5a44f635 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallStatusImpl.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.FirewallStatusClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FirewallStatusResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallStatus; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallStatusResource; + +public final class FirewallStatusImpl implements FirewallStatus { + private static final ClientLogger LOGGER = new ClientLogger(FirewallStatusImpl.class); + + private final FirewallStatusClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public FirewallStatusImpl( + FirewallStatusClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByFirewalls(String resourceGroupName, String firewallName) { + PagedIterable inner = + this.serviceClient().listByFirewalls(resourceGroupName, firewallName); + return Utils.mapPage(inner, inner1 -> new FirewallStatusResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByFirewalls( + String resourceGroupName, String firewallName, Context context) { + PagedIterable inner = + this.serviceClient().listByFirewalls(resourceGroupName, firewallName, context); + return Utils.mapPage(inner, inner1 -> new FirewallStatusResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String firewallName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, firewallName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FirewallStatusResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FirewallStatusResource get(String resourceGroupName, String firewallName) { + FirewallStatusResourceInner inner = this.serviceClient().get(resourceGroupName, firewallName); + if (inner != null) { + return new FirewallStatusResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + private FirewallStatusClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallStatusResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallStatusResourceImpl.java new file mode 100644 index 000000000000..042fb911d498 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallStatusResourceImpl.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FirewallStatusResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallStatusResource; +import com.azure.resourcemanager.paloaltonetworks.models.HealthStatus; +import com.azure.resourcemanager.paloaltonetworks.models.PanoramaStatus; +import com.azure.resourcemanager.paloaltonetworks.models.ReadOnlyProvisioningState; + +public final class FirewallStatusResourceImpl implements FirewallStatusResource { + private FirewallStatusResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + FirewallStatusResourceImpl( + FirewallStatusResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = 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 BooleanEnum isPanoramaManaged() { + return this.innerModel().isPanoramaManaged(); + } + + public HealthStatus healthStatus() { + return this.innerModel().healthStatus(); + } + + public String healthReason() { + return this.innerModel().healthReason(); + } + + public PanoramaStatus panoramaStatus() { + return this.innerModel().panoramaStatus(); + } + + public ReadOnlyProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public FirewallStatusResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallsClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallsClientImpl.java new file mode 100644 index 000000000000..5b7e0fca6971 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallsClientImpl.java @@ -0,0 +1,2083 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.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.paloaltonetworks.fluent.FirewallsClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FirewallResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackInfoInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LogSettingsInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SupportInfoInner; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallResourceListResult; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallResourceUpdate; +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 FirewallsClient. */ +public final class FirewallsClientImpl implements FirewallsClient { + /** The proxy service used to perform REST calls. */ + private final FirewallsService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of FirewallsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FirewallsClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy.create(FirewallsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwFirewalls to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface FirewallsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/PaloAltoNetworks.Cloudngfw/firewalls") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") 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}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") 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/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("firewallName") String firewallName, + @BodyParam("application/json") FirewallResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("firewallName") String firewallName, + @BodyParam("application/json") FirewallResourceUpdate properties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/getGlobalRulestack") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getGlobalRulestack( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/getLogProfile") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getLogProfile( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/getSupportInfo") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getSupportInfo( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("firewallName") String firewallName, + @QueryParam("email") String email, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/saveLogProfile") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> saveLogProfile( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("firewallName") String firewallName, + @BodyParam("application/json") LogSettingsInner logSettings, + @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, + @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, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List FirewallResource resources by subscription ID. + * + * @throws ManagementException thrown 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 FirewallResource 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.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 FirewallResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List FirewallResource resources by subscription ID. + * + * @throws ManagementException thrown 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 FirewallResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List FirewallResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallResource list operation 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 FirewallResource resources by subscription ID. + * + * @throws ManagementException thrown 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 FirewallResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List FirewallResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List FirewallResource resources by 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 FirewallResource 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.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 FirewallResource resources by 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 FirewallResource list operation 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.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List FirewallResource resources by 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 FirewallResource 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)); + } + + /** + * List FirewallResource resources by 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 FirewallResource list operation 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 FirewallResource resources by 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 FirewallResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List FirewallResource resources by 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 FirewallResource 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)); + } + + /** + * Get a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FirewallResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FirewallResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String firewallName, 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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + accept, + context); + } + + /** + * Get a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FirewallResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String firewallName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, firewallName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FirewallResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String firewallName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, firewallName, context).block(); + } + + /** + * Get a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FirewallResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FirewallResourceInner getByResourceGroup(String resourceGroupName, String firewallName) { + return getByResourceGroupWithResponse(resourceGroupName, firewallName, Context.NONE).getValue(); + } + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String firewallName, FirewallResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String firewallName, FirewallResourceInner resource, 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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + resource, + accept, + context); + } + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FirewallResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String firewallName, FirewallResourceInner resource) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, firewallName, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FirewallResourceInner.class, + FirewallResourceInner.class, + this.client.getContext()); + } + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 PollerFlux} for polling of paloAltoNetworks Firewall. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FirewallResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String firewallName, FirewallResourceInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, firewallName, resource, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), FirewallResourceInner.class, FirewallResourceInner.class, context); + } + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FirewallResourceInner> beginCreateOrUpdate( + String resourceGroupName, String firewallName, FirewallResourceInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, firewallName, resource).getSyncPoller(); + } + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FirewallResourceInner> beginCreateOrUpdate( + String resourceGroupName, String firewallName, FirewallResourceInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, firewallName, resource, context).getSyncPoller(); + } + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String firewallName, FirewallResourceInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, firewallName, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String firewallName, FirewallResourceInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, firewallName, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FirewallResourceInner createOrUpdate( + String resourceGroupName, String firewallName, FirewallResourceInner resource) { + return createOrUpdateAsync(resourceGroupName, firewallName, resource).block(); + } + + /** + * Create a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param resource 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 paloAltoNetworks Firewall. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FirewallResourceInner createOrUpdate( + String resourceGroupName, String firewallName, FirewallResourceInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, firewallName, resource, context).block(); + } + + /** + * Update a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param properties 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 paloAltoNetworks Firewall along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String firewallName, FirewallResourceUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + properties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param properties 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 paloAltoNetworks Firewall along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String firewallName, FirewallResourceUpdate properties, 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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + properties, + accept, + context); + } + + /** + * Update a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param properties 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 paloAltoNetworks Firewall on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String firewallName, FirewallResourceUpdate properties) { + return updateWithResponseAsync(resourceGroupName, firewallName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param properties 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 paloAltoNetworks Firewall along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String firewallName, FirewallResourceUpdate properties, Context context) { + return updateWithResponseAsync(resourceGroupName, firewallName, properties, context).block(); + } + + /** + * Update a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param properties 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 paloAltoNetworks Firewall. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FirewallResourceInner update( + String resourceGroupName, String firewallName, FirewallResourceUpdate properties) { + return updateWithResponse(resourceGroupName, firewallName, properties, Context.NONE).getValue(); + } + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 firewallName, 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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + accept, + context); + } + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 firewallName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, firewallName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 firewallName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, firewallName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 firewallName) { + return this.beginDeleteAsync(resourceGroupName, firewallName).getSyncPoller(); + } + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 firewallName, Context context) { + return this.beginDeleteAsync(resourceGroupName, firewallName, context).getSyncPoller(); + } + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 firewallName) { + return beginDeleteAsync(resourceGroupName, firewallName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 firewallName, Context context) { + return beginDeleteAsync(resourceGroupName, firewallName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 firewallName) { + deleteAsync(resourceGroupName, firewallName).block(); + } + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 firewallName, Context context) { + deleteAsync(resourceGroupName, firewallName, context).block(); + } + + /** + * Get Global Rulestack associated with the Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return global Rulestack associated with the Firewall along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getGlobalRulestackWithResponseAsync( + String resourceGroupName, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getGlobalRulestack( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Global Rulestack associated with the Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return global Rulestack associated with the Firewall along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getGlobalRulestackWithResponseAsync( + String resourceGroupName, String firewallName, 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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getGlobalRulestack( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + accept, + context); + } + + /** + * Get Global Rulestack associated with the Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return global Rulestack associated with the Firewall on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getGlobalRulestackAsync(String resourceGroupName, String firewallName) { + return getGlobalRulestackWithResponseAsync(resourceGroupName, firewallName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Global Rulestack associated with the Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return global Rulestack associated with the Firewall along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getGlobalRulestackWithResponse( + String resourceGroupName, String firewallName, Context context) { + return getGlobalRulestackWithResponseAsync(resourceGroupName, firewallName, context).block(); + } + + /** + * Get Global Rulestack associated with the Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return global Rulestack associated with the Firewall. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GlobalRulestackInfoInner getGlobalRulestack(String resourceGroupName, String firewallName) { + return getGlobalRulestackWithResponse(resourceGroupName, firewallName, Context.NONE).getValue(); + } + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return log Settings for Firewall along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getLogProfileWithResponseAsync( + String resourceGroupName, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getLogProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return log Settings for Firewall along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getLogProfileWithResponseAsync( + String resourceGroupName, String firewallName, 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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getLogProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + accept, + context); + } + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return log Settings for Firewall on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getLogProfileAsync(String resourceGroupName, String firewallName) { + return getLogProfileWithResponseAsync(resourceGroupName, firewallName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return log Settings for Firewall along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getLogProfileWithResponse( + String resourceGroupName, String firewallName, Context context) { + return getLogProfileWithResponseAsync(resourceGroupName, firewallName, context).block(); + } + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return log Settings for Firewall. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogSettingsInner getLogProfile(String resourceGroupName, String firewallName) { + return getLogProfileWithResponse(resourceGroupName, firewallName, Context.NONE).getValue(); + } + + /** + * support info for firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param email email address on behalf of which this API called. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSupportInfoWithResponseAsync( + String resourceGroupName, String firewallName, String email) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getSupportInfo( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + email, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * support info for firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param email email address on behalf of which this API called. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSupportInfoWithResponseAsync( + String resourceGroupName, String firewallName, String email, 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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getSupportInfo( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + email, + accept, + context); + } + + /** + * support info for firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSupportInfoAsync(String resourceGroupName, String firewallName) { + final String email = null; + return getSupportInfoWithResponseAsync(resourceGroupName, firewallName, email) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * support info for firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param email email address on behalf of which this API called. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSupportInfoWithResponse( + String resourceGroupName, String firewallName, String email, Context context) { + return getSupportInfoWithResponseAsync(resourceGroupName, firewallName, email, context).block(); + } + + /** + * support info for firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SupportInfoInner getSupportInfo(String resourceGroupName, String firewallName) { + final String email = null; + return getSupportInfoWithResponse(resourceGroupName, firewallName, email, Context.NONE).getValue(); + } + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param logSettings Log Settings for Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> saveLogProfileWithResponseAsync( + String resourceGroupName, String firewallName, LogSettingsInner logSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + if (logSettings != null) { + logSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .saveLogProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + logSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param logSettings Log Settings for Firewall. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> saveLogProfileWithResponseAsync( + String resourceGroupName, String firewallName, LogSettingsInner logSettings, 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 (firewallName == null) { + return Mono.error(new IllegalArgumentException("Parameter firewallName is required and cannot be null.")); + } + if (logSettings != null) { + logSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .saveLogProfile( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + firewallName, + logSettings, + accept, + context); + } + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 saveLogProfileAsync(String resourceGroupName, String firewallName) { + final LogSettingsInner logSettings = null; + return saveLogProfileWithResponseAsync(resourceGroupName, firewallName, logSettings) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param logSettings Log Settings for Firewall. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response saveLogProfileWithResponse( + String resourceGroupName, String firewallName, LogSettingsInner logSettings, Context context) { + return saveLogProfileWithResponseAsync(resourceGroupName, firewallName, logSettings, context).block(); + } + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 saveLogProfile(String resourceGroupName, String firewallName) { + final LogSettingsInner logSettings = null; + saveLogProfileWithResponse(resourceGroupName, firewallName, logSettings, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallResource 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( + 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallResource 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( + 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FirewallResource list operation 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)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallsImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallsImpl.java new file mode 100644 index 000000000000..28f53f5c5714 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FirewallsImpl.java @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.FirewallsClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FirewallResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackInfoInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LogSettingsInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SupportInfoInner; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallResource; +import com.azure.resourcemanager.paloaltonetworks.models.Firewalls; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackInfo; +import com.azure.resourcemanager.paloaltonetworks.models.LogSettings; +import com.azure.resourcemanager.paloaltonetworks.models.SupportInfo; + +public final class FirewallsImpl implements Firewalls { + private static final ClientLogger LOGGER = new ClientLogger(FirewallsImpl.class); + + private final FirewallsClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public FirewallsImpl( + FirewallsClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new FirewallResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new FirewallResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new FirewallResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new FirewallResourceImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String firewallName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, firewallName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FirewallResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FirewallResource getByResourceGroup(String resourceGroupName, String firewallName) { + FirewallResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, firewallName); + if (inner != null) { + return new FirewallResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String firewallName) { + this.serviceClient().delete(resourceGroupName, firewallName); + } + + public void delete(String resourceGroupName, String firewallName, Context context) { + this.serviceClient().delete(resourceGroupName, firewallName, context); + } + + public Response getGlobalRulestackWithResponse( + String resourceGroupName, String firewallName, Context context) { + Response inner = + this.serviceClient().getGlobalRulestackWithResponse(resourceGroupName, firewallName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new GlobalRulestackInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GlobalRulestackInfo getGlobalRulestack(String resourceGroupName, String firewallName) { + GlobalRulestackInfoInner inner = this.serviceClient().getGlobalRulestack(resourceGroupName, firewallName); + if (inner != null) { + return new GlobalRulestackInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getLogProfileWithResponse( + String resourceGroupName, String firewallName, Context context) { + Response inner = + this.serviceClient().getLogProfileWithResponse(resourceGroupName, firewallName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new LogSettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LogSettings getLogProfile(String resourceGroupName, String firewallName) { + LogSettingsInner inner = this.serviceClient().getLogProfile(resourceGroupName, firewallName); + if (inner != null) { + return new LogSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSupportInfoWithResponse( + String resourceGroupName, String firewallName, String email, Context context) { + Response inner = + this.serviceClient().getSupportInfoWithResponse(resourceGroupName, firewallName, email, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SupportInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SupportInfo getSupportInfo(String resourceGroupName, String firewallName) { + SupportInfoInner inner = this.serviceClient().getSupportInfo(resourceGroupName, firewallName); + if (inner != null) { + return new SupportInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response saveLogProfileWithResponse( + String resourceGroupName, String firewallName, LogSettingsInner logSettings, Context context) { + return this.serviceClient().saveLogProfileWithResponse(resourceGroupName, firewallName, logSettings, context); + } + + public void saveLogProfile(String resourceGroupName, String firewallName) { + this.serviceClient().saveLogProfile(resourceGroupName, firewallName); + } + + public FirewallResource getById(String id) { + String resourceGroupName = Utils.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 firewallName = Utils.getValueFromIdByName(id, "firewalls"); + if (firewallName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'firewalls'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, firewallName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 firewallName = Utils.getValueFromIdByName(id, "firewalls"); + if (firewallName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'firewalls'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, firewallName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.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 firewallName = Utils.getValueFromIdByName(id, "firewalls"); + if (firewallName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'firewalls'.", id))); + } + this.delete(resourceGroupName, firewallName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 firewallName = Utils.getValueFromIdByName(id, "firewalls"); + if (firewallName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'firewalls'.", id))); + } + this.delete(resourceGroupName, firewallName, context); + } + + private FirewallsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } + + public FirewallResourceImpl define(String name) { + return new FirewallResourceImpl(name, this.manager()); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListGlobalRulestackResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListGlobalRulestackResourceImpl.java new file mode 100644 index 000000000000..022fb7931467 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListGlobalRulestackResourceImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListGlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.FqdnListGlobalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import java.util.Collections; +import java.util.List; + +public final class FqdnListGlobalRulestackResourceImpl implements FqdnListGlobalRulestackResource { + private FqdnListGlobalRulestackResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + FqdnListGlobalRulestackResourceImpl( + FqdnListGlobalRulestackResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = 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 String description() { + return this.innerModel().description(); + } + + public List fqdnList() { + List inner = this.innerModel().fqdnList(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String etag() { + return this.innerModel().etag(); + } + + public String auditComment() { + return this.innerModel().auditComment(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public FqdnListGlobalRulestackResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListGlobalRulestacksClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListGlobalRulestacksClientImpl.java new file mode 100644 index 000000000000..13ffe6d1d0ab --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListGlobalRulestacksClientImpl.java @@ -0,0 +1,937 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.PathParam; +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.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.paloaltonetworks.fluent.FqdnListGlobalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListGlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.FqdnListGlobalRulestackResourceListResult; +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 FqdnListGlobalRulestacksClient. */ +public final class FqdnListGlobalRulestacksClientImpl implements FqdnListGlobalRulestacksClient { + /** The proxy service used to perform REST calls. */ + private final FqdnListGlobalRulestacksService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of FqdnListGlobalRulestacksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FqdnListGlobalRulestacksClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy + .create(FqdnListGlobalRulestacksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwFqdnListGlobalRulestacks to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface FqdnListGlobalRulestacksService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("name") String name, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("name") String name, + @BodyParam("application/json") FqdnListGlobalRulestackResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("name") String name, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List FqdnListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListGlobalRulestackResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String globalRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + 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 FqdnListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListGlobalRulestackResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String globalRulestackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName 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(), globalRulestackName, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List FqdnListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListGlobalRulestackResource list operation as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String globalRulestackName) { + return new PagedFlux<>( + () -> listSinglePageAsync(globalRulestackName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List FqdnListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListGlobalRulestackResource list operation as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String globalRulestackName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(globalRulestackName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List FqdnListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListGlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String globalRulestackName) { + return new PagedIterable<>(listAsync(globalRulestackName)); + } + + /** + * List FqdnListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListGlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String globalRulestackName, Context context) { + return new PagedIterable<>(listAsync(globalRulestackName, context)); + } + + /** + * Get a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FqdnListGlobalRulestackResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String globalRulestackName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FqdnListGlobalRulestackResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String globalRulestackName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get(this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, name, accept, context); + } + + /** + * Get a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FqdnListGlobalRulestackResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String globalRulestackName, String name) { + return getWithResponseAsync(globalRulestackName, name).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FqdnListGlobalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String globalRulestackName, String name, Context context) { + return getWithResponseAsync(globalRulestackName, name, context).block(); + } + + /** + * Get a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FqdnListGlobalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FqdnListGlobalRulestackResourceInner get(String globalRulestackName, String name) { + return getWithResponse(globalRulestackName, name, Context.NONE).getValue(); + } + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + name, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + name, + resource, + accept, + context); + } + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FqdnListGlobalRulestackResourceInner> + beginCreateOrUpdateAsync( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(globalRulestackName, name, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FqdnListGlobalRulestackResourceInner.class, + FqdnListGlobalRulestackResourceInner.class, + this.client.getContext()); + } + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 PollerFlux} for polling of globalRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FqdnListGlobalRulestackResourceInner> + beginCreateOrUpdateAsync( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(globalRulestackName, name, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FqdnListGlobalRulestackResourceInner.class, + FqdnListGlobalRulestackResourceInner.class, + context); + } + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FqdnListGlobalRulestackResourceInner> + beginCreateOrUpdate(String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource) { + return this.beginCreateOrUpdateAsync(globalRulestackName, name, resource).getSyncPoller(); + } + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FqdnListGlobalRulestackResourceInner> + beginCreateOrUpdate( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource, Context context) { + return this.beginCreateOrUpdateAsync(globalRulestackName, name, resource, context).getSyncPoller(); + } + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource) { + return beginCreateOrUpdateAsync(globalRulestackName, name, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource, Context context) { + return beginCreateOrUpdateAsync(globalRulestackName, name, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FqdnListGlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource) { + return createOrUpdateAsync(globalRulestackName, name, resource).block(); + } + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FqdnListGlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource, Context context) { + return createOrUpdateAsync(globalRulestackName, name, resource, context).block(); + } + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete(this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, name, accept, context); + } + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String name) { + Mono>> mono = deleteWithResponseAsync(globalRulestackName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(globalRulestackName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 globalRulestackName, String name) { + return this.beginDeleteAsync(globalRulestackName, name).getSyncPoller(); + } + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 globalRulestackName, String name, Context context) { + return this.beginDeleteAsync(globalRulestackName, name, context).getSyncPoller(); + } + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 globalRulestackName, String name) { + return beginDeleteAsync(globalRulestackName, name).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 globalRulestackName, String name, Context context) { + return beginDeleteAsync(globalRulestackName, name, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 globalRulestackName, String name) { + deleteAsync(globalRulestackName, name).block(); + } + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 globalRulestackName, String name, Context context) { + deleteAsync(globalRulestackName, name, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListGlobalRulestackResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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(), + 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListGlobalRulestackResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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.")); + } + 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)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListGlobalRulestacksImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListGlobalRulestacksImpl.java new file mode 100644 index 000000000000..399a83b3b21c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListGlobalRulestacksImpl.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.FqdnListGlobalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListGlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.FqdnListGlobalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.FqdnListGlobalRulestacks; + +public final class FqdnListGlobalRulestacksImpl implements FqdnListGlobalRulestacks { + private static final ClientLogger LOGGER = new ClientLogger(FqdnListGlobalRulestacksImpl.class); + + private final FqdnListGlobalRulestacksClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public FqdnListGlobalRulestacksImpl( + FqdnListGlobalRulestacksClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String globalRulestackName) { + PagedIterable inner = this.serviceClient().list(globalRulestackName); + return Utils.mapPage(inner, inner1 -> new FqdnListGlobalRulestackResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String globalRulestackName, Context context) { + PagedIterable inner = + this.serviceClient().list(globalRulestackName, context); + return Utils.mapPage(inner, inner1 -> new FqdnListGlobalRulestackResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String globalRulestackName, String name, Context context) { + Response inner = + this.serviceClient().getWithResponse(globalRulestackName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FqdnListGlobalRulestackResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FqdnListGlobalRulestackResource get(String globalRulestackName, String name) { + FqdnListGlobalRulestackResourceInner inner = this.serviceClient().get(globalRulestackName, name); + if (inner != null) { + return new FqdnListGlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public FqdnListGlobalRulestackResource createOrUpdate( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource) { + FqdnListGlobalRulestackResourceInner inner = + this.serviceClient().createOrUpdate(globalRulestackName, name, resource); + if (inner != null) { + return new FqdnListGlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public FqdnListGlobalRulestackResource createOrUpdate( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource, Context context) { + FqdnListGlobalRulestackResourceInner inner = + this.serviceClient().createOrUpdate(globalRulestackName, name, resource, context); + if (inner != null) { + return new FqdnListGlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String globalRulestackName, String name) { + this.serviceClient().delete(globalRulestackName, name); + } + + public void delete(String globalRulestackName, String name, Context context) { + this.serviceClient().delete(globalRulestackName, name, context); + } + + private FqdnListGlobalRulestacksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListLocalRulestackResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListLocalRulestackResourceImpl.java new file mode 100644 index 000000000000..cf8f3432024a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListLocalRulestackResourceImpl.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListLocalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.FqdnListLocalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import java.util.Collections; +import java.util.List; + +public final class FqdnListLocalRulestackResourceImpl + implements FqdnListLocalRulestackResource, + FqdnListLocalRulestackResource.Definition, + FqdnListLocalRulestackResource.Update { + private FqdnListLocalRulestackResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager 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 String description() { + return this.innerModel().description(); + } + + public List fqdnList() { + List inner = this.innerModel().fqdnList(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String etag() { + return this.innerModel().etag(); + } + + public String auditComment() { + return this.innerModel().auditComment(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public FqdnListLocalRulestackResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String localRulestackName; + + private String name; + + public FqdnListLocalRulestackResourceImpl withExistingLocalRulestack( + String resourceGroupName, String localRulestackName) { + this.resourceGroupName = resourceGroupName; + this.localRulestackName = localRulestackName; + return this; + } + + public FqdnListLocalRulestackResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getFqdnListLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, name, this.innerModel(), Context.NONE); + return this; + } + + public FqdnListLocalRulestackResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFqdnListLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, name, this.innerModel(), context); + return this; + } + + FqdnListLocalRulestackResourceImpl( + String name, com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = new FqdnListLocalRulestackResourceInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public FqdnListLocalRulestackResourceImpl update() { + return this; + } + + public FqdnListLocalRulestackResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getFqdnListLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, name, this.innerModel(), Context.NONE); + return this; + } + + public FqdnListLocalRulestackResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFqdnListLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, name, this.innerModel(), context); + return this; + } + + FqdnListLocalRulestackResourceImpl( + FqdnListLocalRulestackResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.localRulestackName = Utils.getValueFromIdByName(innerObject.id(), "localRulestacks"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "fqdnlists"); + } + + public FqdnListLocalRulestackResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getFqdnListLocalRulestacks() + .getWithResponse(resourceGroupName, localRulestackName, name, Context.NONE) + .getValue(); + return this; + } + + public FqdnListLocalRulestackResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFqdnListLocalRulestacks() + .getWithResponse(resourceGroupName, localRulestackName, name, context) + .getValue(); + return this; + } + + public FqdnListLocalRulestackResourceImpl withFqdnList(List fqdnList) { + this.innerModel().withFqdnList(fqdnList); + return this; + } + + public FqdnListLocalRulestackResourceImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public FqdnListLocalRulestackResourceImpl withEtag(String etag) { + this.innerModel().withEtag(etag); + return this; + } + + public FqdnListLocalRulestackResourceImpl withAuditComment(String auditComment) { + this.innerModel().withAuditComment(auditComment); + return this; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListLocalRulestacksClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListLocalRulestacksClientImpl.java new file mode 100644 index 000000000000..9569e987a275 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListLocalRulestacksClientImpl.java @@ -0,0 +1,1149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.PathParam; +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.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.paloaltonetworks.fluent.FqdnListLocalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListLocalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.FqdnListLocalRulestackResourceListResult; +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 FqdnListLocalRulestacksClient. */ +public final class FqdnListLocalRulestacksClientImpl implements FqdnListLocalRulestacksClient { + /** The proxy service used to perform REST calls. */ + private final FqdnListLocalRulestacksService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of FqdnListLocalRulestacksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FqdnListLocalRulestacksClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy + .create(FqdnListLocalRulestacksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwFqdnListLocalRulestacks to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface FqdnListLocalRulestacksService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocalRulestacks( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("name") String name, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("name") String name, + @BodyParam("application/json") FqdnListLocalRulestackResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("name") String name, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocalRulestacksNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List FqdnListLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListLocalRulestackResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksSinglePageAsync( + String resourceGroupName, String localRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByLocalRulestacks( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + 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 FqdnListLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListLocalRulestackResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksSinglePageAsync( + String resourceGroupName, String localRulestackName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByLocalRulestacks( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List FqdnListLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListLocalRulestackResource list operation as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocalRulestacksAsync( + String resourceGroupName, String localRulestackName) { + return new PagedFlux<>( + () -> listByLocalRulestacksSinglePageAsync(resourceGroupName, localRulestackName), + nextLink -> listByLocalRulestacksNextSinglePageAsync(nextLink)); + } + + /** + * List FqdnListLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListLocalRulestackResource list operation as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocalRulestacksAsync( + String resourceGroupName, String localRulestackName, Context context) { + return new PagedFlux<>( + () -> listByLocalRulestacksSinglePageAsync(resourceGroupName, localRulestackName, context), + nextLink -> listByLocalRulestacksNextSinglePageAsync(nextLink, context)); + } + + /** + * List FqdnListLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListLocalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName) { + return new PagedIterable<>(listByLocalRulestacksAsync(resourceGroupName, localRulestackName)); + } + + /** + * List FqdnListLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListLocalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context) { + return new PagedIterable<>(listByLocalRulestacksAsync(resourceGroupName, localRulestackName, context)); + } + + /** + * Get a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FqdnListLocalRulestackResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String localRulestackName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FqdnListLocalRulestackResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String localRulestackName, String name, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + accept, + context); + } + + /** + * Get a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FqdnListLocalRulestackResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String localRulestackName, String name) { + return getWithResponseAsync(resourceGroupName, localRulestackName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FqdnListLocalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String localRulestackName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, localRulestackName, name, context).block(); + } + + /** + * Get a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 FqdnListLocalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FqdnListLocalRulestackResourceInner get(String resourceGroupName, String localRulestackName, String name) { + return getWithResponse(resourceGroupName, localRulestackName, name, Context.NONE).getValue(); + } + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource, + 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + resource, + accept, + context); + } + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FqdnListLocalRulestackResourceInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, localRulestackName, name, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FqdnListLocalRulestackResourceInner.class, + FqdnListLocalRulestackResourceInner.class, + this.client.getContext()); + } + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 PollerFlux} for polling of localRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FqdnListLocalRulestackResourceInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, localRulestackName, name, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FqdnListLocalRulestackResourceInner.class, + FqdnListLocalRulestackResourceInner.class, + context); + } + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FqdnListLocalRulestackResourceInner> + beginCreateOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, name, resource).getSyncPoller(); + } + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FqdnListLocalRulestackResourceInner> + beginCreateOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, name, resource, context) + .getSyncPoller(); + } + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, name, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, name, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FqdnListLocalRulestackResourceInner createOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource) { + return createOrUpdateAsync(resourceGroupName, localRulestackName, name, resource).block(); + } + + /** + * Create a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 localRulestack fqdnList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FqdnListLocalRulestackResourceInner createOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + FqdnListLocalRulestackResourceInner resource, + Context context) { + return createOrUpdateAsync(resourceGroupName, localRulestackName, name, resource, context).block(); + } + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String name, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + accept, + context); + } + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, localRulestackName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, localRulestackName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 localRulestackName, String name) { + return this.beginDeleteAsync(resourceGroupName, localRulestackName, name).getSyncPoller(); + } + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 localRulestackName, String name, Context context) { + return this.beginDeleteAsync(resourceGroupName, localRulestackName, name, context).getSyncPoller(); + } + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 localRulestackName, String name) { + return beginDeleteAsync(resourceGroupName, localRulestackName, name) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 localRulestackName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, localRulestackName, name, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 localRulestackName, String name) { + deleteAsync(resourceGroupName, localRulestackName, name).block(); + } + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 localRulestackName, String name, Context context) { + deleteAsync(resourceGroupName, localRulestackName, name, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListLocalRulestackResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksNextSinglePageAsync( + 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.listByLocalRulestacksNext(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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 FqdnListLocalRulestackResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksNextSinglePageAsync( + 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 + .listByLocalRulestacksNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListLocalRulestacksImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListLocalRulestacksImpl.java new file mode 100644 index 000000000000..890e8a7a1777 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/FqdnListLocalRulestacksImpl.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.FqdnListLocalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListLocalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.FqdnListLocalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.FqdnListLocalRulestacks; + +public final class FqdnListLocalRulestacksImpl implements FqdnListLocalRulestacks { + private static final ClientLogger LOGGER = new ClientLogger(FqdnListLocalRulestacksImpl.class); + + private final FqdnListLocalRulestacksClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public FqdnListLocalRulestacksImpl( + FqdnListLocalRulestacksClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName) { + PagedIterable inner = + this.serviceClient().listByLocalRulestacks(resourceGroupName, localRulestackName); + return Utils.mapPage(inner, inner1 -> new FqdnListLocalRulestackResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context) { + PagedIterable inner = + this.serviceClient().listByLocalRulestacks(resourceGroupName, localRulestackName, context); + return Utils.mapPage(inner, inner1 -> new FqdnListLocalRulestackResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String localRulestackName, String name, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, localRulestackName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FqdnListLocalRulestackResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FqdnListLocalRulestackResource get(String resourceGroupName, String localRulestackName, String name) { + FqdnListLocalRulestackResourceInner inner = + this.serviceClient().get(resourceGroupName, localRulestackName, name); + if (inner != null) { + return new FqdnListLocalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String localRulestackName, String name) { + this.serviceClient().delete(resourceGroupName, localRulestackName, name); + } + + public void delete(String resourceGroupName, String localRulestackName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, localRulestackName, name, context); + } + + public FqdnListLocalRulestackResource getById(String id) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String name = Utils.getValueFromIdByName(id, "fqdnlists"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fqdnlists'.", id))); + } + return this.getWithResponse(resourceGroupName, localRulestackName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String name = Utils.getValueFromIdByName(id, "fqdnlists"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fqdnlists'.", id))); + } + return this.getWithResponse(resourceGroupName, localRulestackName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String name = Utils.getValueFromIdByName(id, "fqdnlists"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fqdnlists'.", id))); + } + this.delete(resourceGroupName, localRulestackName, name, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String name = Utils.getValueFromIdByName(id, "fqdnlists"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fqdnlists'.", id))); + } + this.delete(resourceGroupName, localRulestackName, name, context); + } + + private FqdnListLocalRulestacksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } + + public FqdnListLocalRulestackResourceImpl define(String name) { + return new FqdnListLocalRulestackResourceImpl(name, this.manager()); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestackInfoImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestackInfoImpl.java new file mode 100644 index 000000000000..08d8577447c1 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestackInfoImpl.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackInfoInner; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackInfo; + +public final class GlobalRulestackInfoImpl implements GlobalRulestackInfo { + private GlobalRulestackInfoInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + GlobalRulestackInfoImpl( + GlobalRulestackInfoInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String azureId() { + return this.innerModel().azureId(); + } + + public GlobalRulestackInfoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestackResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestackResourceImpl.java new file mode 100644 index 000000000000..c7323e7a7e3d --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestackResourceImpl.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import java.util.Collections; +import java.util.List; + +public final class GlobalRulestackResourceImpl implements GlobalRulestackResource { + private GlobalRulestackResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + GlobalRulestackResourceImpl( + GlobalRulestackResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = 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 AzureResourceManagerManagedIdentityProperties identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String panEtag() { + return this.innerModel().panEtag(); + } + + public String panLocation() { + return this.innerModel().panLocation(); + } + + public ScopeType scope() { + return this.innerModel().scope(); + } + + public List associatedSubscriptions() { + List inner = this.innerModel().associatedSubscriptions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String description() { + return this.innerModel().description(); + } + + public DefaultMode defaultMode() { + return this.innerModel().defaultMode(); + } + + public String minAppIdVersion() { + return this.innerModel().minAppIdVersion(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public SecurityServices securityServices() { + return this.innerModel().securityServices(); + } + + public GlobalRulestackResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestacksClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestacksClientImpl.java new file mode 100644 index 000000000000..a8418c3f75fe --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestacksClientImpl.java @@ -0,0 +1,2308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.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.paloaltonetworks.fluent.GlobalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.AdvSecurityObjectListResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ChangelogInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CountriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListAppIdResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListFirewallsResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PredefinedUrlCategoriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SecurityServicesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackResourceListResult; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackResourceUpdate; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesTypeEnum; +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 GlobalRulestacksClient. */ +public final class GlobalRulestacksClientImpl implements GlobalRulestacksClient { + /** The proxy service used to perform REST calls. */ + private final GlobalRulestacksService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of GlobalRulestacksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GlobalRulestacksClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy.create(GlobalRulestacksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwGlobalRulestacks to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface GlobalRulestacksService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @BodyParam("application/json") GlobalRulestackResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @BodyParam("application/json") GlobalRulestackResourceUpdate properties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/commit") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> commit( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/getChangeLog") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getChangeLog( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listAdvancedSecurityObjects") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAdvancedSecurityObjects( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @QueryParam("skip") String skip, + @QueryParam("top") Integer top, + @QueryParam("type") AdvSecurityObjectTypeEnum type, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listAppIds") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAppIds( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @QueryParam("appIdVersion") String appIdVersion, + @QueryParam("appPrefix") String appPrefix, + @QueryParam("skip") String skip, + @QueryParam("top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listCountries") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listCountries( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @QueryParam("skip") String skip, + @QueryParam("top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listFirewalls") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listFirewalls( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listPredefinedUrlCategories") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listPredefinedUrlCategories( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @QueryParam("skip") String skip, + @QueryParam("top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listSecurityServices") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSecurityServices( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @QueryParam("skip") String skip, + @QueryParam("top") Integer top, + @QueryParam("type") SecurityServicesTypeEnum type, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/revert") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> revert( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List GlobalRulestackResource resources by Tenant. + * + * @throws ManagementException thrown 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 GlobalRulestackResource 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> 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)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List GlobalRulestackResource resources by Tenant. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 GlobalRulestackResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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)); + } + + /** + * List GlobalRulestackResource resources by Tenant. + * + * @throws ManagementException thrown 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 GlobalRulestackResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List GlobalRulestackResource resources by Tenant. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 GlobalRulestackResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List GlobalRulestackResource resources by Tenant. + * + * @throws ManagementException thrown 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 GlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List GlobalRulestackResource resources by Tenant. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 GlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 GlobalRulestackResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String globalRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 GlobalRulestackResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String globalRulestackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get(this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, accept, context); + } + + /** + * Get a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 GlobalRulestackResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String globalRulestackName) { + return getWithResponseAsync(globalRulestackName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 GlobalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String globalRulestackName, Context context) { + return getWithResponseAsync(globalRulestackName, context).block(); + } + + /** + * Get a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 GlobalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GlobalRulestackResourceInner get(String globalRulestackName) { + return getWithResponse(globalRulestackName, Context.NONE).getValue(); + } + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String globalRulestackName, GlobalRulestackResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String globalRulestackName, GlobalRulestackResourceInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, resource, accept, context); + } + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, GlobalRulestackResourceInner> beginCreateOrUpdateAsync( + String globalRulestackName, GlobalRulestackResourceInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(globalRulestackName, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + GlobalRulestackResourceInner.class, + GlobalRulestackResourceInner.class, + this.client.getContext()); + } + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 PollerFlux} for polling of paloAltoNetworks GlobalRulestack. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, GlobalRulestackResourceInner> beginCreateOrUpdateAsync( + String globalRulestackName, GlobalRulestackResourceInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(globalRulestackName, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + GlobalRulestackResourceInner.class, + GlobalRulestackResourceInner.class, + context); + } + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, GlobalRulestackResourceInner> beginCreateOrUpdate( + String globalRulestackName, GlobalRulestackResourceInner resource) { + return this.beginCreateOrUpdateAsync(globalRulestackName, resource).getSyncPoller(); + } + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, GlobalRulestackResourceInner> beginCreateOrUpdate( + String globalRulestackName, GlobalRulestackResourceInner resource, Context context) { + return this.beginCreateOrUpdateAsync(globalRulestackName, resource, context).getSyncPoller(); + } + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String globalRulestackName, GlobalRulestackResourceInner resource) { + return beginCreateOrUpdateAsync(globalRulestackName, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String globalRulestackName, GlobalRulestackResourceInner resource, Context context) { + return beginCreateOrUpdateAsync(globalRulestackName, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, GlobalRulestackResourceInner resource) { + return createOrUpdateAsync(globalRulestackName, resource).block(); + } + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, GlobalRulestackResourceInner resource, Context context) { + return createOrUpdateAsync(globalRulestackName, resource, context).block(); + } + + /** + * Update a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param properties 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 paloAltoNetworks GlobalRulestack along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String globalRulestackName, GlobalRulestackResourceUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + properties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param properties 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 paloAltoNetworks GlobalRulestack along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String globalRulestackName, GlobalRulestackResourceUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + properties, + accept, + context); + } + + /** + * Update a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param properties 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 paloAltoNetworks GlobalRulestack on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String globalRulestackName, GlobalRulestackResourceUpdate properties) { + return updateWithResponseAsync(globalRulestackName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param properties 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 paloAltoNetworks GlobalRulestack along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String globalRulestackName, GlobalRulestackResourceUpdate properties, Context context) { + return updateWithResponseAsync(globalRulestackName, properties, context).block(); + } + + /** + * Update a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param properties 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 paloAltoNetworks GlobalRulestack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GlobalRulestackResourceInner update(String globalRulestackName, GlobalRulestackResourceUpdate properties) { + return updateWithResponse(globalRulestackName, properties, Context.NONE).getValue(); + } + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete(this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, accept, context); + } + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName) { + Mono>> mono = deleteWithResponseAsync(globalRulestackName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(globalRulestackName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 globalRulestackName) { + return this.beginDeleteAsync(globalRulestackName).getSyncPoller(); + } + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 globalRulestackName, Context context) { + return this.beginDeleteAsync(globalRulestackName, context).getSyncPoller(); + } + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 globalRulestackName) { + return beginDeleteAsync(globalRulestackName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 globalRulestackName, Context context) { + return beginDeleteAsync(globalRulestackName, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 globalRulestackName) { + deleteAsync(globalRulestackName).block(); + } + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 globalRulestackName, Context context) { + deleteAsync(globalRulestackName, context).block(); + } + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> commitWithResponseAsync(String globalRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .commit( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> commitWithResponseAsync(String globalRulestackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .commit(this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, accept, context); + } + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginCommitAsync(String globalRulestackName) { + Mono>> mono = commitWithResponseAsync(globalRulestackName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginCommitAsync(String globalRulestackName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = commitWithResponseAsync(globalRulestackName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginCommit(String globalRulestackName) { + return this.beginCommitAsync(globalRulestackName).getSyncPoller(); + } + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginCommit(String globalRulestackName, Context context) { + return this.beginCommitAsync(globalRulestackName, context).getSyncPoller(); + } + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 commitAsync(String globalRulestackName) { + return beginCommitAsync(globalRulestackName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 commitAsync(String globalRulestackName, Context context) { + return beginCommitAsync(globalRulestackName, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 commit(String globalRulestackName) { + commitAsync(globalRulestackName).block(); + } + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 commit(String globalRulestackName, Context context) { + commitAsync(globalRulestackName, context).block(); + } + + /** + * Get changelog. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getChangeLogWithResponseAsync(String globalRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getChangeLog( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get changelog. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getChangeLogWithResponseAsync(String globalRulestackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getChangeLog(this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, accept, context); + } + + /** + * Get changelog. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getChangeLogAsync(String globalRulestackName) { + return getChangeLogWithResponseAsync(globalRulestackName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get changelog. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getChangeLogWithResponse(String globalRulestackName, Context context) { + return getChangeLogWithResponseAsync(globalRulestackName, context).block(); + } + + /** + * Get changelog. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ChangelogInner getChangeLog(String globalRulestackName) { + return getChangeLogWithResponse(globalRulestackName, Context.NONE).getValue(); + } + + /** + * Get the list of advanced security objects. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAdvancedSecurityObjectsWithResponseAsync( + String globalRulestackName, AdvSecurityObjectTypeEnum type, String skip, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (type == null) { + return Mono.error(new IllegalArgumentException("Parameter type is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listAdvancedSecurityObjects( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + skip, + top, + type, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the list of advanced security objects. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAdvancedSecurityObjectsWithResponseAsync( + String globalRulestackName, AdvSecurityObjectTypeEnum type, String skip, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (type == null) { + return Mono.error(new IllegalArgumentException("Parameter type is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listAdvancedSecurityObjects( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + skip, + top, + type, + accept, + context); + } + + /** + * Get the list of advanced security objects. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAdvancedSecurityObjectsAsync( + String globalRulestackName, AdvSecurityObjectTypeEnum type) { + final String skip = null; + final Integer top = null; + return listAdvancedSecurityObjectsWithResponseAsync(globalRulestackName, type, skip, top) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the list of advanced security objects. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listAdvancedSecurityObjectsWithResponse( + String globalRulestackName, AdvSecurityObjectTypeEnum type, String skip, Integer top, Context context) { + return listAdvancedSecurityObjectsWithResponseAsync(globalRulestackName, type, skip, top, context).block(); + } + + /** + * Get the list of advanced security objects. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AdvSecurityObjectListResponseInner listAdvancedSecurityObjects( + String globalRulestackName, AdvSecurityObjectTypeEnum type) { + final String skip = null; + final Integer top = null; + return listAdvancedSecurityObjectsWithResponse(globalRulestackName, type, skip, top, Context.NONE).getValue(); + } + + /** + * List of AppIds for GlobalRulestack ApiVersion. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param appIdVersion The appIdVersion parameter. + * @param appPrefix The appPrefix parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> listAppIdsWithResponseAsync( + String globalRulestackName, String appIdVersion, String appPrefix, String skip, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listAppIds( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + appIdVersion, + appPrefix, + skip, + top, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List of AppIds for GlobalRulestack ApiVersion. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param appIdVersion The appIdVersion parameter. + * @param appPrefix The appPrefix parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> listAppIdsWithResponseAsync( + String globalRulestackName, String appIdVersion, String appPrefix, String skip, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listAppIds( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + appIdVersion, + appPrefix, + skip, + top, + accept, + context); + } + + /** + * List of AppIds for GlobalRulestack ApiVersion. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 listAppIdsAsync(String globalRulestackName) { + final String appIdVersion = null; + final String appPrefix = null; + final String skip = null; + final Integer top = null; + return listAppIdsWithResponseAsync(globalRulestackName, appIdVersion, appPrefix, skip, top) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List of AppIds for GlobalRulestack ApiVersion. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param appIdVersion The appIdVersion parameter. + * @param appPrefix The appPrefix parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public Response listAppIdsWithResponse( + String globalRulestackName, String appIdVersion, String appPrefix, String skip, Integer top, Context context) { + return listAppIdsWithResponseAsync(globalRulestackName, appIdVersion, appPrefix, skip, top, context).block(); + } + + /** + * List of AppIds for GlobalRulestack ApiVersion. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 ListAppIdResponseInner listAppIds(String globalRulestackName) { + final String appIdVersion = null; + final String appPrefix = null; + final String skip = null; + final Integer top = null; + return listAppIdsWithResponse(globalRulestackName, appIdVersion, appPrefix, skip, top, Context.NONE).getValue(); + } + + /** + * List of countries for Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCountriesWithResponseAsync( + String globalRulestackName, String skip, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listCountries( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + skip, + top, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List of countries for Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCountriesWithResponseAsync( + String globalRulestackName, String skip, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listCountries( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + skip, + top, + accept, + context); + } + + /** + * List of countries for Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listCountriesAsync(String globalRulestackName) { + final String skip = null; + final Integer top = null; + return listCountriesWithResponseAsync(globalRulestackName, skip, top) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List of countries for Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listCountriesWithResponse( + String globalRulestackName, String skip, Integer top, Context context) { + return listCountriesWithResponseAsync(globalRulestackName, skip, top, context).block(); + } + + /** + * List of countries for Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CountriesResponseInner listCountries(String globalRulestackName) { + final String skip = null; + final Integer top = null; + return listCountriesWithResponse(globalRulestackName, skip, top, Context.NONE).getValue(); + } + + /** + * List of Firewalls associated with Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFirewallsWithResponseAsync(String globalRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listFirewalls( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List of Firewalls associated with Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFirewallsWithResponseAsync( + String globalRulestackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listFirewalls( + this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, accept, context); + } + + /** + * List of Firewalls associated with Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listFirewallsAsync(String globalRulestackName) { + return listFirewallsWithResponseAsync(globalRulestackName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List of Firewalls associated with Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listFirewallsWithResponse(String globalRulestackName, Context context) { + return listFirewallsWithResponseAsync(globalRulestackName, context).block(); + } + + /** + * List of Firewalls associated with Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListFirewallsResponseInner listFirewalls(String globalRulestackName) { + return listFirewallsWithResponse(globalRulestackName, Context.NONE).getValue(); + } + + /** + * List predefined URL categories for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPredefinedUrlCategoriesWithResponseAsync( + String globalRulestackName, String skip, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listPredefinedUrlCategories( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + skip, + top, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List predefined URL categories for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPredefinedUrlCategoriesWithResponseAsync( + String globalRulestackName, String skip, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listPredefinedUrlCategories( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + skip, + top, + accept, + context); + } + + /** + * List predefined URL categories for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPredefinedUrlCategoriesAsync(String globalRulestackName) { + final String skip = null; + final Integer top = null; + return listPredefinedUrlCategoriesWithResponseAsync(globalRulestackName, skip, top) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List predefined URL categories for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listPredefinedUrlCategoriesWithResponse( + String globalRulestackName, String skip, Integer top, Context context) { + return listPredefinedUrlCategoriesWithResponseAsync(globalRulestackName, skip, top, context).block(); + } + + /** + * List predefined URL categories for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PredefinedUrlCategoriesResponseInner listPredefinedUrlCategories(String globalRulestackName) { + final String skip = null; + final Integer top = null; + return listPredefinedUrlCategoriesWithResponse(globalRulestackName, skip, top, Context.NONE).getValue(); + } + + /** + * List the security services for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSecurityServicesWithResponseAsync( + String globalRulestackName, SecurityServicesTypeEnum type, String skip, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (type == null) { + return Mono.error(new IllegalArgumentException("Parameter type is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listSecurityServices( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + skip, + top, + type, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the security services for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSecurityServicesWithResponseAsync( + String globalRulestackName, SecurityServicesTypeEnum type, String skip, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (type == null) { + return Mono.error(new IllegalArgumentException("Parameter type is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSecurityServices( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + skip, + top, + type, + accept, + context); + } + + /** + * List the security services for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSecurityServicesAsync( + String globalRulestackName, SecurityServicesTypeEnum type) { + final String skip = null; + final Integer top = null; + return listSecurityServicesWithResponseAsync(globalRulestackName, type, skip, top) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List the security services for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSecurityServicesWithResponse( + String globalRulestackName, SecurityServicesTypeEnum type, String skip, Integer top, Context context) { + return listSecurityServicesWithResponseAsync(globalRulestackName, type, skip, top, context).block(); + } + + /** + * List the security services for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SecurityServicesResponseInner listSecurityServices( + String globalRulestackName, SecurityServicesTypeEnum type) { + final String skip = null; + final Integer top = null; + return listSecurityServicesWithResponse(globalRulestackName, type, skip, top, Context.NONE).getValue(); + } + + /** + * Revert rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> revertWithResponseAsync(String globalRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .revert( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Revert rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> revertWithResponseAsync(String globalRulestackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .revert(this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, accept, context); + } + + /** + * Revert rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 revertAsync(String globalRulestackName) { + return revertWithResponseAsync(globalRulestackName).flatMap(ignored -> Mono.empty()); + } + + /** + * Revert rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response revertWithResponse(String globalRulestackName, Context context) { + return revertWithResponseAsync(globalRulestackName, context).block(); + } + + /** + * Revert rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 revert(String globalRulestackName) { + revertWithResponse(globalRulestackName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 GlobalRulestackResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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(), + 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 GlobalRulestackResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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.")); + } + 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)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestacksImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestacksImpl.java new file mode 100644 index 000000000000..1566bf08ad08 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/GlobalRulestacksImpl.java @@ -0,0 +1,326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.GlobalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.AdvSecurityObjectListResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ChangelogInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CountriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListAppIdResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListFirewallsResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PredefinedUrlCategoriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SecurityServicesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectListResponse; +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Changelog; +import com.azure.resourcemanager.paloaltonetworks.models.CountriesResponse; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackResourceUpdate; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestacks; +import com.azure.resourcemanager.paloaltonetworks.models.ListAppIdResponse; +import com.azure.resourcemanager.paloaltonetworks.models.ListFirewallsResponse; +import com.azure.resourcemanager.paloaltonetworks.models.PredefinedUrlCategoriesResponse; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesResponse; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesTypeEnum; + +public final class GlobalRulestacksImpl implements GlobalRulestacks { + private static final ClientLogger LOGGER = new ClientLogger(GlobalRulestacksImpl.class); + + private final GlobalRulestacksClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public GlobalRulestacksImpl( + GlobalRulestacksClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new GlobalRulestackResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new GlobalRulestackResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String globalRulestackName, Context context) { + Response inner = + this.serviceClient().getWithResponse(globalRulestackName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new GlobalRulestackResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GlobalRulestackResource get(String globalRulestackName) { + GlobalRulestackResourceInner inner = this.serviceClient().get(globalRulestackName); + if (inner != null) { + return new GlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public GlobalRulestackResource createOrUpdate(String globalRulestackName, GlobalRulestackResourceInner resource) { + GlobalRulestackResourceInner inner = this.serviceClient().createOrUpdate(globalRulestackName, resource); + if (inner != null) { + return new GlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public GlobalRulestackResource createOrUpdate( + String globalRulestackName, GlobalRulestackResourceInner resource, Context context) { + GlobalRulestackResourceInner inner = + this.serviceClient().createOrUpdate(globalRulestackName, resource, context); + if (inner != null) { + return new GlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateWithResponse( + String globalRulestackName, GlobalRulestackResourceUpdate properties, Context context) { + Response inner = + this.serviceClient().updateWithResponse(globalRulestackName, properties, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new GlobalRulestackResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GlobalRulestackResource update(String globalRulestackName, GlobalRulestackResourceUpdate properties) { + GlobalRulestackResourceInner inner = this.serviceClient().update(globalRulestackName, properties); + if (inner != null) { + return new GlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String globalRulestackName) { + this.serviceClient().delete(globalRulestackName); + } + + public void delete(String globalRulestackName, Context context) { + this.serviceClient().delete(globalRulestackName, context); + } + + public void commit(String globalRulestackName) { + this.serviceClient().commit(globalRulestackName); + } + + public void commit(String globalRulestackName, Context context) { + this.serviceClient().commit(globalRulestackName, context); + } + + public Response getChangeLogWithResponse(String globalRulestackName, Context context) { + Response inner = this.serviceClient().getChangeLogWithResponse(globalRulestackName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ChangelogImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Changelog getChangeLog(String globalRulestackName) { + ChangelogInner inner = this.serviceClient().getChangeLog(globalRulestackName); + if (inner != null) { + return new ChangelogImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listAdvancedSecurityObjectsWithResponse( + String globalRulestackName, AdvSecurityObjectTypeEnum type, String skip, Integer top, Context context) { + Response inner = + this.serviceClient().listAdvancedSecurityObjectsWithResponse(globalRulestackName, type, skip, top, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AdvSecurityObjectListResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AdvSecurityObjectListResponse listAdvancedSecurityObjects( + String globalRulestackName, AdvSecurityObjectTypeEnum type) { + AdvSecurityObjectListResponseInner inner = + this.serviceClient().listAdvancedSecurityObjects(globalRulestackName, type); + if (inner != null) { + return new AdvSecurityObjectListResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listAppIdsWithResponse( + String globalRulestackName, String appIdVersion, String appPrefix, String skip, Integer top, Context context) { + Response inner = + this + .serviceClient() + .listAppIdsWithResponse(globalRulestackName, appIdVersion, appPrefix, skip, top, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ListAppIdResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ListAppIdResponse listAppIds(String globalRulestackName) { + ListAppIdResponseInner inner = this.serviceClient().listAppIds(globalRulestackName); + if (inner != null) { + return new ListAppIdResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listCountriesWithResponse( + String globalRulestackName, String skip, Integer top, Context context) { + Response inner = + this.serviceClient().listCountriesWithResponse(globalRulestackName, skip, top, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CountriesResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CountriesResponse listCountries(String globalRulestackName) { + CountriesResponseInner inner = this.serviceClient().listCountries(globalRulestackName); + if (inner != null) { + return new CountriesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listFirewallsWithResponse(String globalRulestackName, Context context) { + Response inner = + this.serviceClient().listFirewallsWithResponse(globalRulestackName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ListFirewallsResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ListFirewallsResponse listFirewalls(String globalRulestackName) { + ListFirewallsResponseInner inner = this.serviceClient().listFirewalls(globalRulestackName); + if (inner != null) { + return new ListFirewallsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listPredefinedUrlCategoriesWithResponse( + String globalRulestackName, String skip, Integer top, Context context) { + Response inner = + this.serviceClient().listPredefinedUrlCategoriesWithResponse(globalRulestackName, skip, top, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PredefinedUrlCategoriesResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PredefinedUrlCategoriesResponse listPredefinedUrlCategories(String globalRulestackName) { + PredefinedUrlCategoriesResponseInner inner = + this.serviceClient().listPredefinedUrlCategories(globalRulestackName); + if (inner != null) { + return new PredefinedUrlCategoriesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listSecurityServicesWithResponse( + String globalRulestackName, SecurityServicesTypeEnum type, String skip, Integer top, Context context) { + Response inner = + this.serviceClient().listSecurityServicesWithResponse(globalRulestackName, type, skip, top, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SecurityServicesResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SecurityServicesResponse listSecurityServices(String globalRulestackName, SecurityServicesTypeEnum type) { + SecurityServicesResponseInner inner = this.serviceClient().listSecurityServices(globalRulestackName, type); + if (inner != null) { + return new SecurityServicesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response revertWithResponse(String globalRulestackName, Context context) { + return this.serviceClient().revertWithResponse(globalRulestackName, context); + } + + public void revert(String globalRulestackName) { + this.serviceClient().revert(globalRulestackName); + } + + private GlobalRulestacksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/ListAppIdResponseImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/ListAppIdResponseImpl.java new file mode 100644 index 000000000000..a6bbfd3a9d45 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/ListAppIdResponseImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListAppIdResponseInner; +import com.azure.resourcemanager.paloaltonetworks.models.ListAppIdResponse; +import java.util.Collections; +import java.util.List; + +public final class ListAppIdResponseImpl implements ListAppIdResponse { + private ListAppIdResponseInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + ListAppIdResponseImpl( + ListAppIdResponseInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public ListAppIdResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/ListFirewallsResponseImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/ListFirewallsResponseImpl.java new file mode 100644 index 000000000000..6b7d9c67a774 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/ListFirewallsResponseImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListFirewallsResponseInner; +import com.azure.resourcemanager.paloaltonetworks.models.ListFirewallsResponse; +import java.util.Collections; +import java.util.List; + +public final class ListFirewallsResponseImpl implements ListFirewallsResponse { + private ListFirewallsResponseInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + ListFirewallsResponseImpl( + ListFirewallsResponseInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public ListFirewallsResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulesClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulesClientImpl.java new file mode 100644 index 000000000000..473aef54b8b0 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulesClientImpl.java @@ -0,0 +1,1675 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.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.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.paloaltonetworks.fluent.LocalRulesClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LocalRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterResetInner; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulesResourceListResult; +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 LocalRulesClient. */ +public final class LocalRulesClientImpl implements LocalRulesClient { + /** The proxy service used to perform REST calls. */ + private final LocalRulesService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of LocalRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LocalRulesClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy.create(LocalRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwLocalRules to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface LocalRulesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocalRulestacks( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("priority") String priority, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("priority") String priority, + @BodyParam("application/json") LocalRulesResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("priority") String priority, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}/getCounters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getCounters( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("priority") String priority, + @QueryParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}/refreshCounters") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> refreshCounters( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("priority") String priority, + @QueryParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}/resetCounters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> resetCounters( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("priority") String priority, + @QueryParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocalRulestacksNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List LocalRulesResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulesResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksSinglePageAsync( + String resourceGroupName, String localRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByLocalRulestacks( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + 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 LocalRulesResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulesResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksSinglePageAsync( + String resourceGroupName, String localRulestackName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByLocalRulestacks( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List LocalRulesResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulesResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocalRulestacksAsync( + String resourceGroupName, String localRulestackName) { + return new PagedFlux<>( + () -> listByLocalRulestacksSinglePageAsync(resourceGroupName, localRulestackName), + nextLink -> listByLocalRulestacksNextSinglePageAsync(nextLink)); + } + + /** + * List LocalRulesResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulesResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocalRulestacksAsync( + String resourceGroupName, String localRulestackName, Context context) { + return new PagedFlux<>( + () -> listByLocalRulestacksSinglePageAsync(resourceGroupName, localRulestackName, context), + nextLink -> listByLocalRulestacksNextSinglePageAsync(nextLink, context)); + } + + /** + * List LocalRulesResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulesResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName) { + return new PagedIterable<>(listByLocalRulestacksAsync(resourceGroupName, localRulestackName)); + } + + /** + * List LocalRulesResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulesResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context) { + return new PagedIterable<>(listByLocalRulestacksAsync(resourceGroupName, localRulestackName, context)); + } + + /** + * Get a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 LocalRulesResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String localRulestackName, String priority) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + priority, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 LocalRulesResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String localRulestackName, String priority, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + priority, + accept, + context); + } + + /** + * Get a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 LocalRulesResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String localRulestackName, String priority) { + return getWithResponseAsync(resourceGroupName, localRulestackName, priority) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 LocalRulesResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String localRulestackName, String priority, Context context) { + return getWithResponseAsync(resourceGroupName, localRulestackName, priority, context).block(); + } + + /** + * Get a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 LocalRulesResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LocalRulesResourceInner get(String resourceGroupName, String localRulestackName, String priority) { + return getWithResponse(resourceGroupName, localRulestackName, priority, Context.NONE).getValue(); + } + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String localRulestackName, String priority, LocalRulesResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + priority, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String localRulestackName, + String priority, + LocalRulesResourceInner resource, + 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + priority, + resource, + accept, + context); + } + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LocalRulesResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String localRulestackName, String priority, LocalRulesResourceInner resource) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, localRulestackName, priority, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + LocalRulesResourceInner.class, + LocalRulesResourceInner.class, + this.client.getContext()); + } + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 PollerFlux} for polling of localRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LocalRulesResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String localRulestackName, + String priority, + LocalRulesResourceInner resource, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, localRulestackName, priority, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + LocalRulesResourceInner.class, + LocalRulesResourceInner.class, + context); + } + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LocalRulesResourceInner> beginCreateOrUpdate( + String resourceGroupName, String localRulestackName, String priority, LocalRulesResourceInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, priority, resource).getSyncPoller(); + } + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LocalRulesResourceInner> beginCreateOrUpdate( + String resourceGroupName, + String localRulestackName, + String priority, + LocalRulesResourceInner resource, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, priority, resource, context) + .getSyncPoller(); + } + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String localRulestackName, String priority, LocalRulesResourceInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, priority, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String localRulestackName, + String priority, + LocalRulesResourceInner resource, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, priority, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LocalRulesResourceInner createOrUpdate( + String resourceGroupName, String localRulestackName, String priority, LocalRulesResourceInner resource) { + return createOrUpdateAsync(resourceGroupName, localRulestackName, priority, resource).block(); + } + + /** + * Create a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param resource 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 localRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LocalRulesResourceInner createOrUpdate( + String resourceGroupName, + String localRulestackName, + String priority, + LocalRulesResourceInner resource, + Context context) { + return createOrUpdateAsync(resourceGroupName, localRulestackName, priority, resource, context).block(); + } + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String priority) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + priority, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String priority, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + priority, + accept, + context); + } + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String priority) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, localRulestackName, priority); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String priority, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, localRulestackName, priority, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 localRulestackName, String priority) { + return this.beginDeleteAsync(resourceGroupName, localRulestackName, priority).getSyncPoller(); + } + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 localRulestackName, String priority, Context context) { + return this.beginDeleteAsync(resourceGroupName, localRulestackName, priority, context).getSyncPoller(); + } + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 localRulestackName, String priority) { + return beginDeleteAsync(resourceGroupName, localRulestackName, priority) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 localRulestackName, String priority, Context context) { + return beginDeleteAsync(resourceGroupName, localRulestackName, priority, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 localRulestackName, String priority) { + deleteAsync(resourceGroupName, localRulestackName, priority).block(); + } + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 localRulestackName, String priority, Context context) { + deleteAsync(resourceGroupName, localRulestackName, priority, context).block(); + } + + /** + * Get counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCountersWithResponseAsync( + String resourceGroupName, String localRulestackName, String priority, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + priority, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCountersWithResponseAsync( + String resourceGroupName, String localRulestackName, String priority, String firewallName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + priority, + firewallName, + accept, + context); + } + + /** + * Get counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCountersAsync( + String resourceGroupName, String localRulestackName, String priority) { + final String firewallName = null; + return getCountersWithResponseAsync(resourceGroupName, localRulestackName, priority, firewallName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCountersWithResponse( + String resourceGroupName, String localRulestackName, String priority, String firewallName, Context context) { + return getCountersWithResponseAsync(resourceGroupName, localRulestackName, priority, firewallName, context) + .block(); + } + + /** + * Get counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RuleCounterInner getCounters(String resourceGroupName, String localRulestackName, String priority) { + final String firewallName = null; + return getCountersWithResponse(resourceGroupName, localRulestackName, priority, firewallName, Context.NONE) + .getValue(); + } + + /** + * Refresh counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> refreshCountersWithResponseAsync( + String resourceGroupName, String localRulestackName, String priority, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .refreshCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + priority, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Refresh counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> refreshCountersWithResponseAsync( + String resourceGroupName, String localRulestackName, String priority, String firewallName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .refreshCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + priority, + firewallName, + accept, + context); + } + + /** + * Refresh counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 refreshCountersAsync(String resourceGroupName, String localRulestackName, String priority) { + final String firewallName = null; + return refreshCountersWithResponseAsync(resourceGroupName, localRulestackName, priority, firewallName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Refresh counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response refreshCountersWithResponse( + String resourceGroupName, String localRulestackName, String priority, String firewallName, Context context) { + return refreshCountersWithResponseAsync(resourceGroupName, localRulestackName, priority, firewallName, context) + .block(); + } + + /** + * Refresh counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 refreshCounters(String resourceGroupName, String localRulestackName, String priority) { + final String firewallName = null; + refreshCountersWithResponse(resourceGroupName, localRulestackName, priority, firewallName, Context.NONE); + } + + /** + * Reset counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetCountersWithResponseAsync( + String resourceGroupName, String localRulestackName, String priority, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resetCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + priority, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reset counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetCountersWithResponseAsync( + String resourceGroupName, String localRulestackName, String priority, String firewallName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resetCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + priority, + firewallName, + accept, + context); + } + + /** + * Reset counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetCountersAsync( + String resourceGroupName, String localRulestackName, String priority) { + final String firewallName = null; + return resetCountersWithResponseAsync(resourceGroupName, localRulestackName, priority, firewallName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Reset counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resetCountersWithResponse( + String resourceGroupName, String localRulestackName, String priority, String firewallName, Context context) { + return resetCountersWithResponseAsync(resourceGroupName, localRulestackName, priority, firewallName, context) + .block(); + } + + /** + * Reset counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RuleCounterResetInner resetCounters(String resourceGroupName, String localRulestackName, String priority) { + final String firewallName = null; + return resetCountersWithResponse(resourceGroupName, localRulestackName, priority, firewallName, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulesResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksNextSinglePageAsync(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.listByLocalRulestacksNext(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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulesResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksNextSinglePageAsync( + 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 + .listByLocalRulestacksNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulesImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulesImpl.java new file mode 100644 index 000000000000..da4c8f29c2ef --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulesImpl.java @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.LocalRulesClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LocalRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterResetInner; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRules; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulesResource; +import com.azure.resourcemanager.paloaltonetworks.models.RuleCounter; +import com.azure.resourcemanager.paloaltonetworks.models.RuleCounterReset; + +public final class LocalRulesImpl implements LocalRules { + private static final ClientLogger LOGGER = new ClientLogger(LocalRulesImpl.class); + + private final LocalRulesClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public LocalRulesImpl( + LocalRulesClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName) { + PagedIterable inner = + this.serviceClient().listByLocalRulestacks(resourceGroupName, localRulestackName); + return Utils.mapPage(inner, inner1 -> new LocalRulesResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context) { + PagedIterable inner = + this.serviceClient().listByLocalRulestacks(resourceGroupName, localRulestackName, context); + return Utils.mapPage(inner, inner1 -> new LocalRulesResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String localRulestackName, String priority, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, localRulestackName, priority, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new LocalRulesResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LocalRulesResource get(String resourceGroupName, String localRulestackName, String priority) { + LocalRulesResourceInner inner = this.serviceClient().get(resourceGroupName, localRulestackName, priority); + if (inner != null) { + return new LocalRulesResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String localRulestackName, String priority) { + this.serviceClient().delete(resourceGroupName, localRulestackName, priority); + } + + public void delete(String resourceGroupName, String localRulestackName, String priority, Context context) { + this.serviceClient().delete(resourceGroupName, localRulestackName, priority, context); + } + + public Response getCountersWithResponse( + String resourceGroupName, String localRulestackName, String priority, String firewallName, Context context) { + Response inner = + this + .serviceClient() + .getCountersWithResponse(resourceGroupName, localRulestackName, priority, firewallName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RuleCounterImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RuleCounter getCounters(String resourceGroupName, String localRulestackName, String priority) { + RuleCounterInner inner = this.serviceClient().getCounters(resourceGroupName, localRulestackName, priority); + if (inner != null) { + return new RuleCounterImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response refreshCountersWithResponse( + String resourceGroupName, String localRulestackName, String priority, String firewallName, Context context) { + return this + .serviceClient() + .refreshCountersWithResponse(resourceGroupName, localRulestackName, priority, firewallName, context); + } + + public void refreshCounters(String resourceGroupName, String localRulestackName, String priority) { + this.serviceClient().refreshCounters(resourceGroupName, localRulestackName, priority); + } + + public Response resetCountersWithResponse( + String resourceGroupName, String localRulestackName, String priority, String firewallName, Context context) { + Response inner = + this + .serviceClient() + .resetCountersWithResponse(resourceGroupName, localRulestackName, priority, firewallName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RuleCounterResetImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RuleCounterReset resetCounters(String resourceGroupName, String localRulestackName, String priority) { + RuleCounterResetInner inner = + this.serviceClient().resetCounters(resourceGroupName, localRulestackName, priority); + if (inner != null) { + return new RuleCounterResetImpl(inner, this.manager()); + } else { + return null; + } + } + + public LocalRulesResource getById(String id) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String priority = Utils.getValueFromIdByName(id, "localRules"); + if (priority == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'localRules'.", id))); + } + return this.getWithResponse(resourceGroupName, localRulestackName, priority, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String priority = Utils.getValueFromIdByName(id, "localRules"); + if (priority == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'localRules'.", id))); + } + return this.getWithResponse(resourceGroupName, localRulestackName, priority, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String priority = Utils.getValueFromIdByName(id, "localRules"); + if (priority == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'localRules'.", id))); + } + this.delete(resourceGroupName, localRulestackName, priority, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String priority = Utils.getValueFromIdByName(id, "localRules"); + if (priority == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'localRules'.", id))); + } + this.delete(resourceGroupName, localRulestackName, priority, context); + } + + private LocalRulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } + + public LocalRulesResourceImpl define(String name) { + return new LocalRulesResourceImpl(name, this.manager()); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulesResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulesResourceImpl.java new file mode 100644 index 000000000000..ededb32f4fba --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulesResourceImpl.java @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LocalRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulesResource; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.RuleCounter; +import com.azure.resourcemanager.paloaltonetworks.models.RuleCounterReset; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import java.util.Collections; +import java.util.List; + +public final class LocalRulesResourceImpl + implements LocalRulesResource, LocalRulesResource.Definition, LocalRulesResource.Update { + private LocalRulesResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager 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 String etag() { + return this.innerModel().etag(); + } + + public String ruleName() { + return this.innerModel().ruleName(); + } + + public Integer priority() { + return this.innerModel().priority(); + } + + public String description() { + return this.innerModel().description(); + } + + public StateEnum ruleState() { + return this.innerModel().ruleState(); + } + + public SourceAddr source() { + return this.innerModel().source(); + } + + public BooleanEnum negateSource() { + return this.innerModel().negateSource(); + } + + public DestinationAddr destination() { + return this.innerModel().destination(); + } + + public BooleanEnum negateDestination() { + return this.innerModel().negateDestination(); + } + + public List applications() { + List inner = this.innerModel().applications(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Category category() { + return this.innerModel().category(); + } + + public String protocol() { + return this.innerModel().protocol(); + } + + public List protocolPortList() { + List inner = this.innerModel().protocolPortList(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String inboundInspectionCertificate() { + return this.innerModel().inboundInspectionCertificate(); + } + + public String auditComment() { + return this.innerModel().auditComment(); + } + + public ActionEnum actionType() { + return this.innerModel().actionType(); + } + + public StateEnum enableLogging() { + return this.innerModel().enableLogging(); + } + + public DecryptionRuleTypeEnum decryptionRuleType() { + return this.innerModel().decryptionRuleType(); + } + + public List tags() { + List inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public LocalRulesResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String localRulestackName; + + private String priority; + + public LocalRulesResourceImpl withExistingLocalRulestack(String resourceGroupName, String localRulestackName) { + this.resourceGroupName = resourceGroupName; + this.localRulestackName = localRulestackName; + return this; + } + + public LocalRulesResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getLocalRules() + .createOrUpdate(resourceGroupName, localRulestackName, priority, this.innerModel(), Context.NONE); + return this; + } + + public LocalRulesResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLocalRules() + .createOrUpdate(resourceGroupName, localRulestackName, priority, this.innerModel(), context); + return this; + } + + LocalRulesResourceImpl( + String name, com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = new LocalRulesResourceInner(); + this.serviceManager = serviceManager; + this.priority = name; + } + + public LocalRulesResourceImpl update() { + return this; + } + + public LocalRulesResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getLocalRules() + .createOrUpdate(resourceGroupName, localRulestackName, priority, this.innerModel(), Context.NONE); + return this; + } + + public LocalRulesResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLocalRules() + .createOrUpdate(resourceGroupName, localRulestackName, priority, this.innerModel(), context); + return this; + } + + LocalRulesResourceImpl( + LocalRulesResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.localRulestackName = Utils.getValueFromIdByName(innerObject.id(), "localRulestacks"); + this.priority = Utils.getValueFromIdByName(innerObject.id(), "localRules"); + } + + public LocalRulesResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getLocalRules() + .getWithResponse(resourceGroupName, localRulestackName, priority, Context.NONE) + .getValue(); + return this; + } + + public LocalRulesResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLocalRules() + .getWithResponse(resourceGroupName, localRulestackName, priority, context) + .getValue(); + return this; + } + + public Response getCountersWithResponse(String firewallName, Context context) { + return serviceManager + .localRules() + .getCountersWithResponse(resourceGroupName, localRulestackName, priority, firewallName, context); + } + + public RuleCounter getCounters() { + return serviceManager.localRules().getCounters(resourceGroupName, localRulestackName, priority); + } + + public Response refreshCountersWithResponse(String firewallName, Context context) { + return serviceManager + .localRules() + .refreshCountersWithResponse(resourceGroupName, localRulestackName, priority, firewallName, context); + } + + public void refreshCounters() { + serviceManager.localRules().refreshCounters(resourceGroupName, localRulestackName, priority); + } + + public Response resetCountersWithResponse(String firewallName, Context context) { + return serviceManager + .localRules() + .resetCountersWithResponse(resourceGroupName, localRulestackName, priority, firewallName, context); + } + + public RuleCounterReset resetCounters() { + return serviceManager.localRules().resetCounters(resourceGroupName, localRulestackName, priority); + } + + public LocalRulesResourceImpl withRuleName(String ruleName) { + this.innerModel().withRuleName(ruleName); + return this; + } + + public LocalRulesResourceImpl withTags(List tags) { + this.innerModel().withTags(tags); + return this; + } + + public LocalRulesResourceImpl withEtag(String etag) { + this.innerModel().withEtag(etag); + return this; + } + + public LocalRulesResourceImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public LocalRulesResourceImpl withRuleState(StateEnum ruleState) { + this.innerModel().withRuleState(ruleState); + return this; + } + + public LocalRulesResourceImpl withSource(SourceAddr source) { + this.innerModel().withSource(source); + return this; + } + + public LocalRulesResourceImpl withNegateSource(BooleanEnum negateSource) { + this.innerModel().withNegateSource(negateSource); + return this; + } + + public LocalRulesResourceImpl withDestination(DestinationAddr destination) { + this.innerModel().withDestination(destination); + return this; + } + + public LocalRulesResourceImpl withNegateDestination(BooleanEnum negateDestination) { + this.innerModel().withNegateDestination(negateDestination); + return this; + } + + public LocalRulesResourceImpl withApplications(List applications) { + this.innerModel().withApplications(applications); + return this; + } + + public LocalRulesResourceImpl withCategory(Category category) { + this.innerModel().withCategory(category); + return this; + } + + public LocalRulesResourceImpl withProtocol(String protocol) { + this.innerModel().withProtocol(protocol); + return this; + } + + public LocalRulesResourceImpl withProtocolPortList(List protocolPortList) { + this.innerModel().withProtocolPortList(protocolPortList); + return this; + } + + public LocalRulesResourceImpl withInboundInspectionCertificate(String inboundInspectionCertificate) { + this.innerModel().withInboundInspectionCertificate(inboundInspectionCertificate); + return this; + } + + public LocalRulesResourceImpl withAuditComment(String auditComment) { + this.innerModel().withAuditComment(auditComment); + return this; + } + + public LocalRulesResourceImpl withActionType(ActionEnum actionType) { + this.innerModel().withActionType(actionType); + return this; + } + + public LocalRulesResourceImpl withEnableLogging(StateEnum enableLogging) { + this.innerModel().withEnableLogging(enableLogging); + return this; + } + + public LocalRulesResourceImpl withDecryptionRuleType(DecryptionRuleTypeEnum decryptionRuleType) { + this.innerModel().withDecryptionRuleType(decryptionRuleType); + return this; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulestackResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulestackResourceImpl.java new file mode 100644 index 000000000000..e5286d02b64f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulestackResourceImpl.java @@ -0,0 +1,376 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LocalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.Changelog; +import com.azure.resourcemanager.paloaltonetworks.models.CountriesResponse; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.ListAppIdResponse; +import com.azure.resourcemanager.paloaltonetworks.models.ListFirewallsResponse; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestackResourceUpdate; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestackResourceUpdateProperties; +import com.azure.resourcemanager.paloaltonetworks.models.PredefinedUrlCategoriesResponse; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import com.azure.resourcemanager.paloaltonetworks.models.SupportInfo; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class LocalRulestackResourceImpl + implements LocalRulestackResource, LocalRulestackResource.Definition, LocalRulestackResource.Update { + private LocalRulestackResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager 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 AzureResourceManagerManagedIdentityProperties identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String panEtag() { + return this.innerModel().panEtag(); + } + + public String panLocation() { + return this.innerModel().panLocation(); + } + + public ScopeType scope() { + return this.innerModel().scope(); + } + + public List associatedSubscriptions() { + List inner = this.innerModel().associatedSubscriptions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String description() { + return this.innerModel().description(); + } + + public DefaultMode defaultMode() { + return this.innerModel().defaultMode(); + } + + public String minAppIdVersion() { + return this.innerModel().minAppIdVersion(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public SecurityServices securityServices() { + return this.innerModel().securityServices(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public LocalRulestackResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String localRulestackName; + + private LocalRulestackResourceUpdate updateProperties; + + public LocalRulestackResourceImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public LocalRulestackResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, this.innerModel(), Context.NONE); + return this; + } + + public LocalRulestackResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, this.innerModel(), context); + return this; + } + + LocalRulestackResourceImpl( + String name, com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = new LocalRulestackResourceInner(); + this.serviceManager = serviceManager; + this.localRulestackName = name; + } + + public LocalRulestackResourceImpl update() { + this.updateProperties = new LocalRulestackResourceUpdate(); + return this; + } + + public LocalRulestackResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getLocalRulestacks() + .updateWithResponse(resourceGroupName, localRulestackName, updateProperties, Context.NONE) + .getValue(); + return this; + } + + public LocalRulestackResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLocalRulestacks() + .updateWithResponse(resourceGroupName, localRulestackName, updateProperties, context) + .getValue(); + return this; + } + + LocalRulestackResourceImpl( + LocalRulestackResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.localRulestackName = Utils.getValueFromIdByName(innerObject.id(), "localRulestacks"); + } + + public LocalRulestackResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getLocalRulestacks() + .getByResourceGroupWithResponse(resourceGroupName, localRulestackName, Context.NONE) + .getValue(); + return this; + } + + public LocalRulestackResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLocalRulestacks() + .getByResourceGroupWithResponse(resourceGroupName, localRulestackName, context) + .getValue(); + return this; + } + + public void commit() { + serviceManager.localRulestacks().commit(resourceGroupName, localRulestackName); + } + + public void commit(Context context) { + serviceManager.localRulestacks().commit(resourceGroupName, localRulestackName, context); + } + + public Response getChangeLogWithResponse(Context context) { + return serviceManager + .localRulestacks() + .getChangeLogWithResponse(resourceGroupName, localRulestackName, context); + } + + public Changelog getChangeLog() { + return serviceManager.localRulestacks().getChangeLog(resourceGroupName, localRulestackName); + } + + public Response getSupportInfoWithResponse(String email, Context context) { + return serviceManager + .localRulestacks() + .getSupportInfoWithResponse(resourceGroupName, localRulestackName, email, context); + } + + public SupportInfo getSupportInfo() { + return serviceManager.localRulestacks().getSupportInfo(resourceGroupName, localRulestackName); + } + + public Response listAppIdsWithResponse( + String appIdVersion, String appPrefix, String skip, Integer top, Context context) { + return serviceManager + .localRulestacks() + .listAppIdsWithResponse(resourceGroupName, localRulestackName, appIdVersion, appPrefix, skip, top, context); + } + + public ListAppIdResponse listAppIds() { + return serviceManager.localRulestacks().listAppIds(resourceGroupName, localRulestackName); + } + + public Response listCountriesWithResponse(String skip, Integer top, Context context) { + return serviceManager + .localRulestacks() + .listCountriesWithResponse(resourceGroupName, localRulestackName, skip, top, context); + } + + public CountriesResponse listCountries() { + return serviceManager.localRulestacks().listCountries(resourceGroupName, localRulestackName); + } + + public Response listFirewallsWithResponse(Context context) { + return serviceManager + .localRulestacks() + .listFirewallsWithResponse(resourceGroupName, localRulestackName, context); + } + + public ListFirewallsResponse listFirewalls() { + return serviceManager.localRulestacks().listFirewalls(resourceGroupName, localRulestackName); + } + + public Response listPredefinedUrlCategoriesWithResponse( + String skip, Integer top, Context context) { + return serviceManager + .localRulestacks() + .listPredefinedUrlCategoriesWithResponse(resourceGroupName, localRulestackName, skip, top, context); + } + + public PredefinedUrlCategoriesResponse listPredefinedUrlCategories() { + return serviceManager.localRulestacks().listPredefinedUrlCategories(resourceGroupName, localRulestackName); + } + + public Response revertWithResponse(Context context) { + return serviceManager.localRulestacks().revertWithResponse(resourceGroupName, localRulestackName, context); + } + + public void revert() { + serviceManager.localRulestacks().revert(resourceGroupName, localRulestackName); + } + + public LocalRulestackResourceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public LocalRulestackResourceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public LocalRulestackResourceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public LocalRulestackResourceImpl withIdentity(AzureResourceManagerManagedIdentityProperties identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateProperties.withIdentity(identity); + return this; + } + } + + public LocalRulestackResourceImpl withPanEtag(String panEtag) { + this.innerModel().withPanEtag(panEtag); + return this; + } + + public LocalRulestackResourceImpl withPanLocation(String panLocation) { + this.innerModel().withPanLocation(panLocation); + return this; + } + + public LocalRulestackResourceImpl withScope(ScopeType scope) { + this.innerModel().withScope(scope); + return this; + } + + public LocalRulestackResourceImpl withAssociatedSubscriptions(List associatedSubscriptions) { + this.innerModel().withAssociatedSubscriptions(associatedSubscriptions); + return this; + } + + public LocalRulestackResourceImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public LocalRulestackResourceImpl withDefaultMode(DefaultMode defaultMode) { + this.innerModel().withDefaultMode(defaultMode); + return this; + } + + public LocalRulestackResourceImpl withMinAppIdVersion(String minAppIdVersion) { + this.innerModel().withMinAppIdVersion(minAppIdVersion); + return this; + } + + public LocalRulestackResourceImpl withSecurityServices(SecurityServices securityServices) { + this.innerModel().withSecurityServices(securityServices); + return this; + } + + public LocalRulestackResourceImpl withProperties(LocalRulestackResourceUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulestacksClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulestacksClientImpl.java new file mode 100644 index 000000000000..453744f35fca --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulestacksClientImpl.java @@ -0,0 +1,3313 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.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.paloaltonetworks.fluent.LocalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.AdvSecurityObjectListResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ChangelogInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CountriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListAppIdResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListFirewallsResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LocalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PredefinedUrlCategoriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SecurityServicesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SupportInfoInner; +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestackResourceListResult; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestackResourceUpdate; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesTypeEnum; +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 LocalRulestacksClient. */ +public final class LocalRulestacksClientImpl implements LocalRulestacksClient { + /** The proxy service used to perform REST calls. */ + private final LocalRulestacksService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of LocalRulestacksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LocalRulestacksClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy.create(LocalRulestacksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwLocalRulestacks to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface LocalRulestacksService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") 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}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") 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/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @BodyParam("application/json") LocalRulestackResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @BodyParam("application/json") LocalRulestackResourceUpdate properties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/commit") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> commit( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/getChangeLog") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getChangeLog( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/getSupportInfo") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getSupportInfo( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @QueryParam("email") String email, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listAdvancedSecurityObjects") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAdvancedSecurityObjects( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @QueryParam("skip") String skip, + @QueryParam("top") Integer top, + @QueryParam("type") AdvSecurityObjectTypeEnum type, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listAppIds") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAppIds( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @QueryParam("appIdVersion") String appIdVersion, + @QueryParam("appPrefix") String appPrefix, + @QueryParam("skip") String skip, + @QueryParam("top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listCountries") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listCountries( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @QueryParam("skip") String skip, + @QueryParam("top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listFirewalls") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listFirewalls( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listPredefinedUrlCategories") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listPredefinedUrlCategories( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @QueryParam("skip") String skip, + @QueryParam("top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listSecurityServices") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSecurityServices( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @QueryParam("skip") String skip, + @QueryParam("top") Integer top, + @QueryParam("type") SecurityServicesTypeEnum type, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/revert") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> revert( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @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, + @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, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List LocalRulestackResource resources by subscription ID. + * + * @throws ManagementException thrown 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 LocalRulestackResource 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.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 LocalRulestackResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulestackResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List LocalRulestackResource resources by subscription ID. + * + * @throws ManagementException thrown 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 LocalRulestackResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List LocalRulestackResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulestackResource list operation 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 LocalRulestackResource resources by subscription ID. + * + * @throws ManagementException thrown 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 LocalRulestackResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List LocalRulestackResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulestackResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List LocalRulestackResource resources by 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 LocalRulestackResource 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.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 LocalRulestackResource resources by 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 LocalRulestackResource list operation 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.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List LocalRulestackResource resources by 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 LocalRulestackResource 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)); + } + + /** + * List LocalRulestackResource resources by 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 LocalRulestackResource list operation 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 LocalRulestackResource resources by 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 LocalRulestackResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List LocalRulestackResource resources by 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 LocalRulestackResource 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)); + } + + /** + * Get a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 LocalRulestackResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String localRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 LocalRulestackResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String localRulestackName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context); + } + + /** + * Get a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 LocalRulestackResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync( + String resourceGroupName, String localRulestackName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, localRulestackName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 LocalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String localRulestackName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, localRulestackName, context).block(); + } + + /** + * Get a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 LocalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LocalRulestackResourceInner getByResourceGroup(String resourceGroupName, String localRulestackName) { + return getByResourceGroupWithResponse(resourceGroupName, localRulestackName, Context.NONE).getValue(); + } + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + resource, + accept, + context); + } + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LocalRulestackResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, localRulestackName, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + LocalRulestackResourceInner.class, + LocalRulestackResourceInner.class, + this.client.getContext()); + } + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 PollerFlux} for polling of paloAltoNetworks LocalRulestack. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LocalRulestackResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, localRulestackName, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + LocalRulestackResourceInner.class, + LocalRulestackResourceInner.class, + context); + } + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LocalRulestackResourceInner> beginCreateOrUpdate( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, resource).getSyncPoller(); + } + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LocalRulestackResourceInner> beginCreateOrUpdate( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, resource, context).getSyncPoller(); + } + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LocalRulestackResourceInner createOrUpdate( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource) { + return createOrUpdateAsync(resourceGroupName, localRulestackName, resource).block(); + } + + /** + * Create a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param resource 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 paloAltoNetworks LocalRulestack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LocalRulestackResourceInner createOrUpdate( + String resourceGroupName, String localRulestackName, LocalRulestackResourceInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, localRulestackName, resource, context).block(); + } + + /** + * Update a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param properties 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 paloAltoNetworks LocalRulestack along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String localRulestackName, LocalRulestackResourceUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + properties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param properties 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 paloAltoNetworks LocalRulestack along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String localRulestackName, LocalRulestackResourceUpdate properties, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + properties, + accept, + context); + } + + /** + * Update a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param properties 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 paloAltoNetworks LocalRulestack on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String localRulestackName, LocalRulestackResourceUpdate properties) { + return updateWithResponseAsync(resourceGroupName, localRulestackName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param properties 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 paloAltoNetworks LocalRulestack along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String localRulestackName, LocalRulestackResourceUpdate properties, Context context) { + return updateWithResponseAsync(resourceGroupName, localRulestackName, properties, context).block(); + } + + /** + * Update a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param properties 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 paloAltoNetworks LocalRulestack. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LocalRulestackResourceInner update( + String resourceGroupName, String localRulestackName, LocalRulestackResourceUpdate properties) { + return updateWithResponse(resourceGroupName, localRulestackName, properties, Context.NONE).getValue(); + } + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context); + } + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, localRulestackName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, localRulestackName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 localRulestackName) { + return this.beginDeleteAsync(resourceGroupName, localRulestackName).getSyncPoller(); + } + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 localRulestackName, Context context) { + return this.beginDeleteAsync(resourceGroupName, localRulestackName, context).getSyncPoller(); + } + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 localRulestackName) { + return beginDeleteAsync(resourceGroupName, localRulestackName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 localRulestackName, Context context) { + return beginDeleteAsync(resourceGroupName, localRulestackName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 localRulestackName) { + deleteAsync(resourceGroupName, localRulestackName).block(); + } + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 localRulestackName, Context context) { + deleteAsync(resourceGroupName, localRulestackName, context).block(); + } + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> commitWithResponseAsync( + String resourceGroupName, String localRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .commit( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> commitWithResponseAsync( + String resourceGroupName, String localRulestackName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .commit( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context); + } + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginCommitAsync(String resourceGroupName, String localRulestackName) { + Mono>> mono = commitWithResponseAsync(resourceGroupName, localRulestackName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginCommitAsync( + String resourceGroupName, String localRulestackName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = commitWithResponseAsync(resourceGroupName, localRulestackName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginCommit(String resourceGroupName, String localRulestackName) { + return this.beginCommitAsync(resourceGroupName, localRulestackName).getSyncPoller(); + } + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginCommit( + String resourceGroupName, String localRulestackName, Context context) { + return this.beginCommitAsync(resourceGroupName, localRulestackName, context).getSyncPoller(); + } + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 commitAsync(String resourceGroupName, String localRulestackName) { + return beginCommitAsync(resourceGroupName, localRulestackName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 commitAsync(String resourceGroupName, String localRulestackName, Context context) { + return beginCommitAsync(resourceGroupName, localRulestackName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 commit(String resourceGroupName, String localRulestackName) { + commitAsync(resourceGroupName, localRulestackName).block(); + } + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 commit(String resourceGroupName, String localRulestackName, Context context) { + commitAsync(resourceGroupName, localRulestackName, context).block(); + } + + /** + * Get changelog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getChangeLogWithResponseAsync( + String resourceGroupName, String localRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getChangeLog( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get changelog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getChangeLogWithResponseAsync( + String resourceGroupName, String localRulestackName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getChangeLog( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context); + } + + /** + * Get changelog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getChangeLogAsync(String resourceGroupName, String localRulestackName) { + return getChangeLogWithResponseAsync(resourceGroupName, localRulestackName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get changelog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getChangeLogWithResponse( + String resourceGroupName, String localRulestackName, Context context) { + return getChangeLogWithResponseAsync(resourceGroupName, localRulestackName, context).block(); + } + + /** + * Get changelog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ChangelogInner getChangeLog(String resourceGroupName, String localRulestackName) { + return getChangeLogWithResponse(resourceGroupName, localRulestackName, Context.NONE).getValue(); + } + + /** + * support info for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param email email address on behalf of which this API called. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSupportInfoWithResponseAsync( + String resourceGroupName, String localRulestackName, String email) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getSupportInfo( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + email, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * support info for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param email email address on behalf of which this API called. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSupportInfoWithResponseAsync( + String resourceGroupName, String localRulestackName, String email, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getSupportInfo( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + email, + accept, + context); + } + + /** + * support info for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSupportInfoAsync(String resourceGroupName, String localRulestackName) { + final String email = null; + return getSupportInfoWithResponseAsync(resourceGroupName, localRulestackName, email) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * support info for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param email email address on behalf of which this API called. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSupportInfoWithResponse( + String resourceGroupName, String localRulestackName, String email, Context context) { + return getSupportInfoWithResponseAsync(resourceGroupName, localRulestackName, email, context).block(); + } + + /** + * support info for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SupportInfoInner getSupportInfo(String resourceGroupName, String localRulestackName) { + final String email = null; + return getSupportInfoWithResponse(resourceGroupName, localRulestackName, email, Context.NONE).getValue(); + } + + /** + * Get the list of advanced security objects. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAdvancedSecurityObjectsWithResponseAsync( + String resourceGroupName, String localRulestackName, AdvSecurityObjectTypeEnum type, String skip, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (type == null) { + return Mono.error(new IllegalArgumentException("Parameter type is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listAdvancedSecurityObjects( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + skip, + top, + type, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the list of advanced security objects. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAdvancedSecurityObjectsWithResponseAsync( + String resourceGroupName, + String localRulestackName, + AdvSecurityObjectTypeEnum type, + String skip, + Integer top, + 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (type == null) { + return Mono.error(new IllegalArgumentException("Parameter type is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listAdvancedSecurityObjects( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + skip, + top, + type, + accept, + context); + } + + /** + * Get the list of advanced security objects. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAdvancedSecurityObjectsAsync( + String resourceGroupName, String localRulestackName, AdvSecurityObjectTypeEnum type) { + final String skip = null; + final Integer top = null; + return listAdvancedSecurityObjectsWithResponseAsync(resourceGroupName, localRulestackName, type, skip, top) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the list of advanced security objects. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listAdvancedSecurityObjectsWithResponse( + String resourceGroupName, + String localRulestackName, + AdvSecurityObjectTypeEnum type, + String skip, + Integer top, + Context context) { + return listAdvancedSecurityObjectsWithResponseAsync( + resourceGroupName, localRulestackName, type, skip, top, context) + .block(); + } + + /** + * Get the list of advanced security objects. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AdvSecurityObjectListResponseInner listAdvancedSecurityObjects( + String resourceGroupName, String localRulestackName, AdvSecurityObjectTypeEnum type) { + final String skip = null; + final Integer top = null; + return listAdvancedSecurityObjectsWithResponse( + resourceGroupName, localRulestackName, type, skip, top, Context.NONE) + .getValue(); + } + + /** + * List of AppIds for LocalRulestack ApiVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param appIdVersion The appIdVersion parameter. + * @param appPrefix The appPrefix parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> listAppIdsWithResponseAsync( + String resourceGroupName, + String localRulestackName, + String appIdVersion, + String appPrefix, + String skip, + Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listAppIds( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + appIdVersion, + appPrefix, + skip, + top, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List of AppIds for LocalRulestack ApiVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param appIdVersion The appIdVersion parameter. + * @param appPrefix The appPrefix parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> listAppIdsWithResponseAsync( + String resourceGroupName, + String localRulestackName, + String appIdVersion, + String appPrefix, + String skip, + Integer top, + 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listAppIds( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + appIdVersion, + appPrefix, + skip, + top, + accept, + context); + } + + /** + * List of AppIds for LocalRulestack ApiVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 listAppIdsAsync(String resourceGroupName, String localRulestackName) { + final String appIdVersion = null; + final String appPrefix = null; + final String skip = null; + final Integer top = null; + return listAppIdsWithResponseAsync(resourceGroupName, localRulestackName, appIdVersion, appPrefix, skip, top) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List of AppIds for LocalRulestack ApiVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param appIdVersion The appIdVersion parameter. + * @param appPrefix The appPrefix parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public Response listAppIdsWithResponse( + String resourceGroupName, + String localRulestackName, + String appIdVersion, + String appPrefix, + String skip, + Integer top, + Context context) { + return listAppIdsWithResponseAsync( + resourceGroupName, localRulestackName, appIdVersion, appPrefix, skip, top, context) + .block(); + } + + /** + * List of AppIds for LocalRulestack ApiVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 ListAppIdResponseInner listAppIds(String resourceGroupName, String localRulestackName) { + final String appIdVersion = null; + final String appPrefix = null; + final String skip = null; + final Integer top = null; + return listAppIdsWithResponse( + resourceGroupName, localRulestackName, appIdVersion, appPrefix, skip, top, Context.NONE) + .getValue(); + } + + /** + * List of countries for Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCountriesWithResponseAsync( + String resourceGroupName, String localRulestackName, String skip, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listCountries( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + skip, + top, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List of countries for Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCountriesWithResponseAsync( + String resourceGroupName, String localRulestackName, String skip, Integer top, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listCountries( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + skip, + top, + accept, + context); + } + + /** + * List of countries for Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listCountriesAsync(String resourceGroupName, String localRulestackName) { + final String skip = null; + final Integer top = null; + return listCountriesWithResponseAsync(resourceGroupName, localRulestackName, skip, top) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List of countries for Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listCountriesWithResponse( + String resourceGroupName, String localRulestackName, String skip, Integer top, Context context) { + return listCountriesWithResponseAsync(resourceGroupName, localRulestackName, skip, top, context).block(); + } + + /** + * List of countries for Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CountriesResponseInner listCountries(String resourceGroupName, String localRulestackName) { + final String skip = null; + final Integer top = null; + return listCountriesWithResponse(resourceGroupName, localRulestackName, skip, top, Context.NONE).getValue(); + } + + /** + * List of Firewalls associated with Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFirewallsWithResponseAsync( + String resourceGroupName, String localRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listFirewalls( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List of Firewalls associated with Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFirewallsWithResponseAsync( + String resourceGroupName, String localRulestackName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listFirewalls( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context); + } + + /** + * List of Firewalls associated with Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listFirewallsAsync(String resourceGroupName, String localRulestackName) { + return listFirewallsWithResponseAsync(resourceGroupName, localRulestackName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List of Firewalls associated with Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listFirewallsWithResponse( + String resourceGroupName, String localRulestackName, Context context) { + return listFirewallsWithResponseAsync(resourceGroupName, localRulestackName, context).block(); + } + + /** + * List of Firewalls associated with Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListFirewallsResponseInner listFirewalls(String resourceGroupName, String localRulestackName) { + return listFirewallsWithResponse(resourceGroupName, localRulestackName, Context.NONE).getValue(); + } + + /** + * List predefined URL categories for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPredefinedUrlCategoriesWithResponseAsync( + String resourceGroupName, String localRulestackName, String skip, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listPredefinedUrlCategories( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + skip, + top, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List predefined URL categories for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPredefinedUrlCategoriesWithResponseAsync( + String resourceGroupName, String localRulestackName, String skip, Integer top, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listPredefinedUrlCategories( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + skip, + top, + accept, + context); + } + + /** + * List predefined URL categories for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPredefinedUrlCategoriesAsync( + String resourceGroupName, String localRulestackName) { + final String skip = null; + final Integer top = null; + return listPredefinedUrlCategoriesWithResponseAsync(resourceGroupName, localRulestackName, skip, top) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List predefined URL categories for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listPredefinedUrlCategoriesWithResponse( + String resourceGroupName, String localRulestackName, String skip, Integer top, Context context) { + return listPredefinedUrlCategoriesWithResponseAsync(resourceGroupName, localRulestackName, skip, top, context) + .block(); + } + + /** + * List predefined URL categories for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PredefinedUrlCategoriesResponseInner listPredefinedUrlCategories( + String resourceGroupName, String localRulestackName) { + final String skip = null; + final Integer top = null; + return listPredefinedUrlCategoriesWithResponse(resourceGroupName, localRulestackName, skip, top, Context.NONE) + .getValue(); + } + + /** + * List the security services for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSecurityServicesWithResponseAsync( + String resourceGroupName, String localRulestackName, SecurityServicesTypeEnum type, String skip, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (type == null) { + return Mono.error(new IllegalArgumentException("Parameter type is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listSecurityServices( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + skip, + top, + type, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the security services for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSecurityServicesWithResponseAsync( + String resourceGroupName, + String localRulestackName, + SecurityServicesTypeEnum type, + String skip, + Integer top, + 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (type == null) { + return Mono.error(new IllegalArgumentException("Parameter type is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSecurityServices( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + skip, + top, + type, + accept, + context); + } + + /** + * List the security services for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSecurityServicesAsync( + String resourceGroupName, String localRulestackName, SecurityServicesTypeEnum type) { + final String skip = null; + final Integer top = null; + return listSecurityServicesWithResponseAsync(resourceGroupName, localRulestackName, type, skip, top) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List the security services for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSecurityServicesWithResponse( + String resourceGroupName, + String localRulestackName, + SecurityServicesTypeEnum type, + String skip, + Integer top, + Context context) { + return listSecurityServicesWithResponseAsync(resourceGroupName, localRulestackName, type, skip, top, context) + .block(); + } + + /** + * List the security services for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SecurityServicesResponseInner listSecurityServices( + String resourceGroupName, String localRulestackName, SecurityServicesTypeEnum type) { + final String skip = null; + final Integer top = null; + return listSecurityServicesWithResponse(resourceGroupName, localRulestackName, type, skip, top, Context.NONE) + .getValue(); + } + + /** + * Revert rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> revertWithResponseAsync(String resourceGroupName, String localRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .revert( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Revert rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> revertWithResponseAsync( + String resourceGroupName, String localRulestackName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .revert( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context); + } + + /** + * Revert rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 revertAsync(String resourceGroupName, String localRulestackName) { + return revertWithResponseAsync(resourceGroupName, localRulestackName).flatMap(ignored -> Mono.empty()); + } + + /** + * Revert rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response revertWithResponse(String resourceGroupName, String localRulestackName, Context context) { + return revertWithResponseAsync(resourceGroupName, localRulestackName, context).block(); + } + + /** + * Revert rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 revert(String resourceGroupName, String localRulestackName) { + revertWithResponse(resourceGroupName, localRulestackName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulestackResource 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( + 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulestackResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulestackResource 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( + 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 LocalRulestackResource list operation 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)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulestacksImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulestacksImpl.java new file mode 100644 index 000000000000..de5d202c0015 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LocalRulestacksImpl.java @@ -0,0 +1,434 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.LocalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.AdvSecurityObjectListResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ChangelogInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CountriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListAppIdResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListFirewallsResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LocalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PredefinedUrlCategoriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SecurityServicesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SupportInfoInner; +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectListResponse; +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Changelog; +import com.azure.resourcemanager.paloaltonetworks.models.CountriesResponse; +import com.azure.resourcemanager.paloaltonetworks.models.ListAppIdResponse; +import com.azure.resourcemanager.paloaltonetworks.models.ListFirewallsResponse; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestacks; +import com.azure.resourcemanager.paloaltonetworks.models.PredefinedUrlCategoriesResponse; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesResponse; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.SupportInfo; + +public final class LocalRulestacksImpl implements LocalRulestacks { + private static final ClientLogger LOGGER = new ClientLogger(LocalRulestacksImpl.class); + + private final LocalRulestacksClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public LocalRulestacksImpl( + LocalRulestacksClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new LocalRulestackResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new LocalRulestackResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new LocalRulestackResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new LocalRulestackResourceImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String localRulestackName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, localRulestackName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new LocalRulestackResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LocalRulestackResource getByResourceGroup(String resourceGroupName, String localRulestackName) { + LocalRulestackResourceInner inner = + this.serviceClient().getByResourceGroup(resourceGroupName, localRulestackName); + if (inner != null) { + return new LocalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String localRulestackName) { + this.serviceClient().delete(resourceGroupName, localRulestackName); + } + + public void delete(String resourceGroupName, String localRulestackName, Context context) { + this.serviceClient().delete(resourceGroupName, localRulestackName, context); + } + + public void commit(String resourceGroupName, String localRulestackName) { + this.serviceClient().commit(resourceGroupName, localRulestackName); + } + + public void commit(String resourceGroupName, String localRulestackName, Context context) { + this.serviceClient().commit(resourceGroupName, localRulestackName, context); + } + + public Response getChangeLogWithResponse( + String resourceGroupName, String localRulestackName, Context context) { + Response inner = + this.serviceClient().getChangeLogWithResponse(resourceGroupName, localRulestackName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ChangelogImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Changelog getChangeLog(String resourceGroupName, String localRulestackName) { + ChangelogInner inner = this.serviceClient().getChangeLog(resourceGroupName, localRulestackName); + if (inner != null) { + return new ChangelogImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSupportInfoWithResponse( + String resourceGroupName, String localRulestackName, String email, Context context) { + Response inner = + this.serviceClient().getSupportInfoWithResponse(resourceGroupName, localRulestackName, email, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SupportInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SupportInfo getSupportInfo(String resourceGroupName, String localRulestackName) { + SupportInfoInner inner = this.serviceClient().getSupportInfo(resourceGroupName, localRulestackName); + if (inner != null) { + return new SupportInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listAdvancedSecurityObjectsWithResponse( + String resourceGroupName, + String localRulestackName, + AdvSecurityObjectTypeEnum type, + String skip, + Integer top, + Context context) { + Response inner = + this + .serviceClient() + .listAdvancedSecurityObjectsWithResponse( + resourceGroupName, localRulestackName, type, skip, top, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AdvSecurityObjectListResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AdvSecurityObjectListResponse listAdvancedSecurityObjects( + String resourceGroupName, String localRulestackName, AdvSecurityObjectTypeEnum type) { + AdvSecurityObjectListResponseInner inner = + this.serviceClient().listAdvancedSecurityObjects(resourceGroupName, localRulestackName, type); + if (inner != null) { + return new AdvSecurityObjectListResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listAppIdsWithResponse( + String resourceGroupName, + String localRulestackName, + String appIdVersion, + String appPrefix, + String skip, + Integer top, + Context context) { + Response inner = + this + .serviceClient() + .listAppIdsWithResponse( + resourceGroupName, localRulestackName, appIdVersion, appPrefix, skip, top, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ListAppIdResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ListAppIdResponse listAppIds(String resourceGroupName, String localRulestackName) { + ListAppIdResponseInner inner = this.serviceClient().listAppIds(resourceGroupName, localRulestackName); + if (inner != null) { + return new ListAppIdResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listCountriesWithResponse( + String resourceGroupName, String localRulestackName, String skip, Integer top, Context context) { + Response inner = + this.serviceClient().listCountriesWithResponse(resourceGroupName, localRulestackName, skip, top, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CountriesResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CountriesResponse listCountries(String resourceGroupName, String localRulestackName) { + CountriesResponseInner inner = this.serviceClient().listCountries(resourceGroupName, localRulestackName); + if (inner != null) { + return new CountriesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listFirewallsWithResponse( + String resourceGroupName, String localRulestackName, Context context) { + Response inner = + this.serviceClient().listFirewallsWithResponse(resourceGroupName, localRulestackName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ListFirewallsResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ListFirewallsResponse listFirewalls(String resourceGroupName, String localRulestackName) { + ListFirewallsResponseInner inner = this.serviceClient().listFirewalls(resourceGroupName, localRulestackName); + if (inner != null) { + return new ListFirewallsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listPredefinedUrlCategoriesWithResponse( + String resourceGroupName, String localRulestackName, String skip, Integer top, Context context) { + Response inner = + this + .serviceClient() + .listPredefinedUrlCategoriesWithResponse(resourceGroupName, localRulestackName, skip, top, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PredefinedUrlCategoriesResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PredefinedUrlCategoriesResponse listPredefinedUrlCategories( + String resourceGroupName, String localRulestackName) { + PredefinedUrlCategoriesResponseInner inner = + this.serviceClient().listPredefinedUrlCategories(resourceGroupName, localRulestackName); + if (inner != null) { + return new PredefinedUrlCategoriesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listSecurityServicesWithResponse( + String resourceGroupName, + String localRulestackName, + SecurityServicesTypeEnum type, + String skip, + Integer top, + Context context) { + Response inner = + this + .serviceClient() + .listSecurityServicesWithResponse(resourceGroupName, localRulestackName, type, skip, top, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SecurityServicesResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SecurityServicesResponse listSecurityServices( + String resourceGroupName, String localRulestackName, SecurityServicesTypeEnum type) { + SecurityServicesResponseInner inner = + this.serviceClient().listSecurityServices(resourceGroupName, localRulestackName, type); + if (inner != null) { + return new SecurityServicesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response revertWithResponse(String resourceGroupName, String localRulestackName, Context context) { + return this.serviceClient().revertWithResponse(resourceGroupName, localRulestackName, context); + } + + public void revert(String resourceGroupName, String localRulestackName) { + this.serviceClient().revert(resourceGroupName, localRulestackName); + } + + public LocalRulestackResource getById(String id) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, localRulestackName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, localRulestackName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + this.delete(resourceGroupName, localRulestackName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + this.delete(resourceGroupName, localRulestackName, context); + } + + private LocalRulestacksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } + + public LocalRulestackResourceImpl define(String name) { + return new LocalRulestackResourceImpl(name, this.manager()); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LogSettingsImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LogSettingsImpl.java new file mode 100644 index 000000000000..fecf7f12c3ce --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/LogSettingsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LogSettingsInner; +import com.azure.resourcemanager.paloaltonetworks.models.ApplicationInsights; +import com.azure.resourcemanager.paloaltonetworks.models.LogDestination; +import com.azure.resourcemanager.paloaltonetworks.models.LogOption; +import com.azure.resourcemanager.paloaltonetworks.models.LogSettings; +import com.azure.resourcemanager.paloaltonetworks.models.LogType; + +public final class LogSettingsImpl implements LogSettings { + private LogSettingsInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + LogSettingsImpl( + LogSettingsInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public LogType logType() { + return this.innerModel().logType(); + } + + public LogOption logOption() { + return this.innerModel().logOption(); + } + + public ApplicationInsights applicationInsights() { + return this.innerModel().applicationInsights(); + } + + public LogDestination commonDestination() { + return this.innerModel().commonDestination(); + } + + public LogDestination trafficLogDestination() { + return this.innerModel().trafficLogDestination(); + } + + public LogDestination threatLogDestination() { + return this.innerModel().threatLogDestination(); + } + + public LogDestination decryptLogDestination() { + return this.innerModel().decryptLogDestination(); + } + + public LogSettingsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/OperationImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/OperationImpl.java new file mode 100644 index 000000000000..b2de3366c88e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/OperationImpl.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.OperationInner; +import com.azure.resourcemanager.paloaltonetworks.models.ActionType; +import com.azure.resourcemanager.paloaltonetworks.models.Operation; +import com.azure.resourcemanager.paloaltonetworks.models.OperationDisplay; +import com.azure.resourcemanager.paloaltonetworks.models.Origin; + +public final class OperationImpl implements Operation { + private OperationInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + OperationImpl( + OperationInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public OperationDisplay display() { + return this.innerModel().display(); + } + + public Origin origin() { + return this.innerModel().origin(); + } + + public ActionType actionType() { + return this.innerModel().actionType(); + } + + public OperationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/OperationsClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/OperationsClientImpl.java new file mode 100644 index 000000000000..68b88859a20c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/OperationsClientImpl.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +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.PathParam; +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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.paloaltonetworks.fluent.OperationsClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.OperationInner; +import com.azure.resourcemanager.paloaltonetworks.models.OperationListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in OperationsClient. */ +public final class OperationsClientImpl implements OperationsClient { + /** The proxy service used to perform REST calls. */ + private final OperationsService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of OperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwOperations to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface OperationsService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * 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 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> 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)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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}. + */ + @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)); + } + + /** + * 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * 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 + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * 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 + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @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(), + 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @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.")); + } + 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)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/OperationsImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/OperationsImpl.java new file mode 100644 index 000000000000..5eccaa6a0b88 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/OperationsImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.OperationsClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.OperationInner; +import com.azure.resourcemanager.paloaltonetworks.models.Operation; +import com.azure.resourcemanager.paloaltonetworks.models.Operations; + +public final class OperationsImpl implements Operations { + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public OperationsImpl( + OperationsClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + private OperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PaloAltoNetworksCloudngfwBuilder.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PaloAltoNetworksCloudngfwBuilder.java new file mode 100644 index 000000000000..c229329029a5 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PaloAltoNetworksCloudngfwBuilder.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** A builder for creating a new instance of the PaloAltoNetworksCloudngfwImpl type. */ +@ServiceClientBuilder(serviceClients = {PaloAltoNetworksCloudngfwImpl.class}) +public final class PaloAltoNetworksCloudngfwBuilder { + /* + * The ID of the target subscription. + */ + private String subscriptionId; + + /** + * Sets The ID of the target subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the PaloAltoNetworksCloudngfwBuilder. + */ + public PaloAltoNetworksCloudngfwBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the PaloAltoNetworksCloudngfwBuilder. + */ + public PaloAltoNetworksCloudngfwBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the PaloAltoNetworksCloudngfwBuilder. + */ + public PaloAltoNetworksCloudngfwBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the PaloAltoNetworksCloudngfwBuilder. + */ + public PaloAltoNetworksCloudngfwBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the PaloAltoNetworksCloudngfwBuilder. + */ + public PaloAltoNetworksCloudngfwBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the PaloAltoNetworksCloudngfwBuilder. + */ + public PaloAltoNetworksCloudngfwBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of PaloAltoNetworksCloudngfwImpl with the provided parameters. + * + * @return an instance of PaloAltoNetworksCloudngfwImpl. + */ + public PaloAltoNetworksCloudngfwImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + PaloAltoNetworksCloudngfwImpl client = + new PaloAltoNetworksCloudngfwImpl( + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); + return client; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PaloAltoNetworksCloudngfwImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PaloAltoNetworksCloudngfwImpl.java new file mode 100644 index 000000000000..75cadf8656ff --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PaloAltoNetworksCloudngfwImpl.java @@ -0,0 +1,472 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +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.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.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.paloaltonetworks.fluent.CertificateObjectGlobalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.CertificateObjectLocalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.FirewallStatusClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.FirewallsClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.FqdnListGlobalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.FqdnListLocalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.GlobalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.LocalRulesClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.LocalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.OperationsClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.PaloAltoNetworksCloudngfw; +import com.azure.resourcemanager.paloaltonetworks.fluent.PostRulesClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.PreRulesClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.PrefixListGlobalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.PrefixListLocalRulestacksClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the PaloAltoNetworksCloudngfwImpl type. */ +@ServiceClient(builder = PaloAltoNetworksCloudngfwBuilder.class) +public final class PaloAltoNetworksCloudngfwImpl implements PaloAltoNetworksCloudngfw { + /** The ID of the target subscription. */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** server parameter. */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The default poll interval for long-running operation. */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** The GlobalRulestacksClient object to access its operations. */ + private final GlobalRulestacksClient globalRulestacks; + + /** + * Gets the GlobalRulestacksClient object to access its operations. + * + * @return the GlobalRulestacksClient object. + */ + public GlobalRulestacksClient getGlobalRulestacks() { + return this.globalRulestacks; + } + + /** The CertificateObjectGlobalRulestacksClient object to access its operations. */ + private final CertificateObjectGlobalRulestacksClient certificateObjectGlobalRulestacks; + + /** + * Gets the CertificateObjectGlobalRulestacksClient object to access its operations. + * + * @return the CertificateObjectGlobalRulestacksClient object. + */ + public CertificateObjectGlobalRulestacksClient getCertificateObjectGlobalRulestacks() { + return this.certificateObjectGlobalRulestacks; + } + + /** The FqdnListGlobalRulestacksClient object to access its operations. */ + private final FqdnListGlobalRulestacksClient fqdnListGlobalRulestacks; + + /** + * Gets the FqdnListGlobalRulestacksClient object to access its operations. + * + * @return the FqdnListGlobalRulestacksClient object. + */ + public FqdnListGlobalRulestacksClient getFqdnListGlobalRulestacks() { + return this.fqdnListGlobalRulestacks; + } + + /** The PostRulesClient object to access its operations. */ + private final PostRulesClient postRules; + + /** + * Gets the PostRulesClient object to access its operations. + * + * @return the PostRulesClient object. + */ + public PostRulesClient getPostRules() { + return this.postRules; + } + + /** The PrefixListGlobalRulestacksClient object to access its operations. */ + private final PrefixListGlobalRulestacksClient prefixListGlobalRulestacks; + + /** + * Gets the PrefixListGlobalRulestacksClient object to access its operations. + * + * @return the PrefixListGlobalRulestacksClient object. + */ + public PrefixListGlobalRulestacksClient getPrefixListGlobalRulestacks() { + return this.prefixListGlobalRulestacks; + } + + /** The PreRulesClient object to access its operations. */ + private final PreRulesClient preRules; + + /** + * Gets the PreRulesClient object to access its operations. + * + * @return the PreRulesClient object. + */ + public PreRulesClient getPreRules() { + return this.preRules; + } + + /** The OperationsClient object to access its operations. */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** The FirewallsClient object to access its operations. */ + private final FirewallsClient firewalls; + + /** + * Gets the FirewallsClient object to access its operations. + * + * @return the FirewallsClient object. + */ + public FirewallsClient getFirewalls() { + return this.firewalls; + } + + /** The LocalRulestacksClient object to access its operations. */ + private final LocalRulestacksClient localRulestacks; + + /** + * Gets the LocalRulestacksClient object to access its operations. + * + * @return the LocalRulestacksClient object. + */ + public LocalRulestacksClient getLocalRulestacks() { + return this.localRulestacks; + } + + /** The FirewallStatusClient object to access its operations. */ + private final FirewallStatusClient firewallStatus; + + /** + * Gets the FirewallStatusClient object to access its operations. + * + * @return the FirewallStatusClient object. + */ + public FirewallStatusClient getFirewallStatus() { + return this.firewallStatus; + } + + /** The CertificateObjectLocalRulestacksClient object to access its operations. */ + private final CertificateObjectLocalRulestacksClient certificateObjectLocalRulestacks; + + /** + * Gets the CertificateObjectLocalRulestacksClient object to access its operations. + * + * @return the CertificateObjectLocalRulestacksClient object. + */ + public CertificateObjectLocalRulestacksClient getCertificateObjectLocalRulestacks() { + return this.certificateObjectLocalRulestacks; + } + + /** The FqdnListLocalRulestacksClient object to access its operations. */ + private final FqdnListLocalRulestacksClient fqdnListLocalRulestacks; + + /** + * Gets the FqdnListLocalRulestacksClient object to access its operations. + * + * @return the FqdnListLocalRulestacksClient object. + */ + public FqdnListLocalRulestacksClient getFqdnListLocalRulestacks() { + return this.fqdnListLocalRulestacks; + } + + /** The LocalRulesClient object to access its operations. */ + private final LocalRulesClient localRules; + + /** + * Gets the LocalRulesClient object to access its operations. + * + * @return the LocalRulesClient object. + */ + public LocalRulesClient getLocalRules() { + return this.localRules; + } + + /** The PrefixListLocalRulestacksClient object to access its operations. */ + private final PrefixListLocalRulestacksClient prefixListLocalRulestacks; + + /** + * Gets the PrefixListLocalRulestacksClient object to access its operations. + * + * @return the PrefixListLocalRulestacksClient object. + */ + public PrefixListLocalRulestacksClient getPrefixListLocalRulestacks() { + return this.prefixListLocalRulestacks; + } + + /** + * Initializes an instance of PaloAltoNetworksCloudngfw 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 subscriptionId The ID of the target subscription. + * @param endpoint server parameter. + */ + PaloAltoNetworksCloudngfwImpl( + HttpPipeline httpPipeline, + SerializerAdapter serializerAdapter, + Duration defaultPollInterval, + AzureEnvironment environment, + String subscriptionId, + String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2022-08-29-preview"; + this.globalRulestacks = new GlobalRulestacksClientImpl(this); + this.certificateObjectGlobalRulestacks = new CertificateObjectGlobalRulestacksClientImpl(this); + this.fqdnListGlobalRulestacks = new FqdnListGlobalRulestacksClientImpl(this); + this.postRules = new PostRulesClientImpl(this); + this.prefixListGlobalRulestacks = new PrefixListGlobalRulestacksClientImpl(this); + this.preRules = new PreRulesClientImpl(this); + this.operations = new OperationsClientImpl(this); + this.firewalls = new FirewallsClientImpl(this); + this.localRulestacks = new LocalRulestacksClientImpl(this); + this.firewallStatus = new FirewallStatusClientImpl(this); + this.certificateObjectLocalRulestacks = new CertificateObjectLocalRulestacksClientImpl(this); + this.fqdnListLocalRulestacks = new FqdnListLocalRulestacksClientImpl(this); + this.localRules = new LocalRulesClientImpl(this); + this.prefixListLocalRulestacks = new PrefixListLocalRulestacksClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult( + Mono>> activationResponse, + HttpPipeline httpPipeline, + Type pollResultType, + Type finalResultType, + Context context) { + return PollerFactory + .create( + serializerAdapter, + httpPipeline, + pollResultType, + finalResultType, + defaultPollInterval, + activationResponse, + context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = + new HttpResponseImpl( + lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = + this + .getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(s); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PaloAltoNetworksCloudngfwImpl.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PostRulesClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PostRulesClientImpl.java new file mode 100644 index 000000000000..db42b99192b0 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PostRulesClientImpl.java @@ -0,0 +1,1380 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.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.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.paloaltonetworks.fluent.PostRulesClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PostRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterResetInner; +import com.azure.resourcemanager.paloaltonetworks.models.PostRulesResourceListResult; +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 PostRulesClient. */ +public final class PostRulesClientImpl implements PostRulesClient { + /** The proxy service used to perform REST calls. */ + private final PostRulesService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of PostRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PostRulesClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy.create(PostRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwPostRules to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface PostRulesService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("priority") String priority, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("priority") String priority, + @BodyParam("application/json") PostRulesResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("priority") String priority, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}/getCounters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getCounters( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("priority") String priority, + @QueryParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}/refreshCounters") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> refreshCounters( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("priority") String priority, + @QueryParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}/resetCounters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> resetCounters( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("priority") String priority, + @QueryParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List PostRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PostRulesResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String globalRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + 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 PostRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PostRulesResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String globalRulestackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName 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(), globalRulestackName, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List PostRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PostRulesResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String globalRulestackName) { + return new PagedFlux<>( + () -> listSinglePageAsync(globalRulestackName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List PostRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PostRulesResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String globalRulestackName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(globalRulestackName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List PostRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PostRulesResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String globalRulestackName) { + return new PagedIterable<>(listAsync(globalRulestackName)); + } + + /** + * List PostRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PostRulesResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String globalRulestackName, Context context) { + return new PagedIterable<>(listAsync(globalRulestackName, context)); + } + + /** + * Get a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PostRulesResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String globalRulestackName, String priority) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PostRulesResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String globalRulestackName, String priority, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, priority, accept, context); + } + + /** + * Get a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PostRulesResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String globalRulestackName, String priority) { + return getWithResponseAsync(globalRulestackName, priority).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PostRulesResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String globalRulestackName, String priority, Context context) { + return getWithResponseAsync(globalRulestackName, priority, context).block(); + } + + /** + * Get a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PostRulesResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PostRulesResourceInner get(String globalRulestackName, String priority) { + return getWithResponse(globalRulestackName, priority, Context.NONE).getValue(); + } + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String globalRulestackName, String priority, PostRulesResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String globalRulestackName, String priority, PostRulesResourceInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + resource, + accept, + context); + } + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PostRulesResourceInner> beginCreateOrUpdateAsync( + String globalRulestackName, String priority, PostRulesResourceInner resource) { + Mono>> mono = + createOrUpdateWithResponseAsync(globalRulestackName, priority, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PostRulesResourceInner.class, + PostRulesResourceInner.class, + this.client.getContext()); + } + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 PollerFlux} for polling of postRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PostRulesResourceInner> beginCreateOrUpdateAsync( + String globalRulestackName, String priority, PostRulesResourceInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(globalRulestackName, priority, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PostRulesResourceInner.class, + PostRulesResourceInner.class, + context); + } + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PostRulesResourceInner> beginCreateOrUpdate( + String globalRulestackName, String priority, PostRulesResourceInner resource) { + return this.beginCreateOrUpdateAsync(globalRulestackName, priority, resource).getSyncPoller(); + } + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PostRulesResourceInner> beginCreateOrUpdate( + String globalRulestackName, String priority, PostRulesResourceInner resource, Context context) { + return this.beginCreateOrUpdateAsync(globalRulestackName, priority, resource, context).getSyncPoller(); + } + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String globalRulestackName, String priority, PostRulesResourceInner resource) { + return beginCreateOrUpdateAsync(globalRulestackName, priority, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String globalRulestackName, String priority, PostRulesResourceInner resource, Context context) { + return beginCreateOrUpdateAsync(globalRulestackName, priority, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PostRulesResourceInner createOrUpdate( + String globalRulestackName, String priority, PostRulesResourceInner resource) { + return createOrUpdateAsync(globalRulestackName, priority, resource).block(); + } + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PostRulesResourceInner createOrUpdate( + String globalRulestackName, String priority, PostRulesResourceInner resource, Context context) { + return createOrUpdateAsync(globalRulestackName, priority, resource, context).block(); + } + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String priority) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String priority, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, priority, accept, context); + } + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String priority) { + Mono>> mono = deleteWithResponseAsync(globalRulestackName, priority); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String priority, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(globalRulestackName, priority, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 globalRulestackName, String priority) { + return this.beginDeleteAsync(globalRulestackName, priority).getSyncPoller(); + } + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 globalRulestackName, String priority, Context context) { + return this.beginDeleteAsync(globalRulestackName, priority, context).getSyncPoller(); + } + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 globalRulestackName, String priority) { + return beginDeleteAsync(globalRulestackName, priority).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 globalRulestackName, String priority, Context context) { + return beginDeleteAsync(globalRulestackName, priority, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 globalRulestackName, String priority) { + deleteAsync(globalRulestackName, priority).block(); + } + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 globalRulestackName, String priority, Context context) { + deleteAsync(globalRulestackName, priority, context).block(); + } + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCountersWithResponseAsync( + String globalRulestackName, String priority, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCountersWithResponseAsync( + String globalRulestackName, String priority, String firewallName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + firewallName, + accept, + context); + } + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCountersAsync(String globalRulestackName, String priority) { + final String firewallName = null; + return getCountersWithResponseAsync(globalRulestackName, priority, firewallName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context) { + return getCountersWithResponseAsync(globalRulestackName, priority, firewallName, context).block(); + } + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RuleCounterInner getCounters(String globalRulestackName, String priority) { + final String firewallName = null; + return getCountersWithResponse(globalRulestackName, priority, firewallName, Context.NONE).getValue(); + } + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> refreshCountersWithResponseAsync( + String globalRulestackName, String priority, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .refreshCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> refreshCountersWithResponseAsync( + String globalRulestackName, String priority, String firewallName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .refreshCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + firewallName, + accept, + context); + } + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 refreshCountersAsync(String globalRulestackName, String priority) { + final String firewallName = null; + return refreshCountersWithResponseAsync(globalRulestackName, priority, firewallName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response refreshCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context) { + return refreshCountersWithResponseAsync(globalRulestackName, priority, firewallName, context).block(); + } + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 refreshCounters(String globalRulestackName, String priority) { + final String firewallName = null; + refreshCountersWithResponse(globalRulestackName, priority, firewallName, Context.NONE); + } + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetCountersWithResponseAsync( + String globalRulestackName, String priority, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resetCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetCountersWithResponseAsync( + String globalRulestackName, String priority, String firewallName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resetCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + firewallName, + accept, + context); + } + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetCountersAsync(String globalRulestackName, String priority) { + final String firewallName = null; + return resetCountersWithResponseAsync(globalRulestackName, priority, firewallName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resetCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context) { + return resetCountersWithResponseAsync(globalRulestackName, priority, firewallName, context).block(); + } + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RuleCounterResetInner resetCounters(String globalRulestackName, String priority) { + final String firewallName = null; + return resetCountersWithResponse(globalRulestackName, priority, firewallName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PostRulesResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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(), + 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PostRulesResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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.")); + } + 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)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PostRulesImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PostRulesImpl.java new file mode 100644 index 000000000000..36413d72c8de --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PostRulesImpl.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.PostRulesClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PostRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterResetInner; +import com.azure.resourcemanager.paloaltonetworks.models.PostRules; +import com.azure.resourcemanager.paloaltonetworks.models.PostRulesResource; +import com.azure.resourcemanager.paloaltonetworks.models.RuleCounter; +import com.azure.resourcemanager.paloaltonetworks.models.RuleCounterReset; + +public final class PostRulesImpl implements PostRules { + private static final ClientLogger LOGGER = new ClientLogger(PostRulesImpl.class); + + private final PostRulesClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public PostRulesImpl( + PostRulesClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String globalRulestackName) { + PagedIterable inner = this.serviceClient().list(globalRulestackName); + return Utils.mapPage(inner, inner1 -> new PostRulesResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String globalRulestackName, Context context) { + PagedIterable inner = this.serviceClient().list(globalRulestackName, context); + return Utils.mapPage(inner, inner1 -> new PostRulesResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String globalRulestackName, String priority, Context context) { + Response inner = + this.serviceClient().getWithResponse(globalRulestackName, priority, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PostRulesResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PostRulesResource get(String globalRulestackName, String priority) { + PostRulesResourceInner inner = this.serviceClient().get(globalRulestackName, priority); + if (inner != null) { + return new PostRulesResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PostRulesResource createOrUpdate( + String globalRulestackName, String priority, PostRulesResourceInner resource) { + PostRulesResourceInner inner = this.serviceClient().createOrUpdate(globalRulestackName, priority, resource); + if (inner != null) { + return new PostRulesResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PostRulesResource createOrUpdate( + String globalRulestackName, String priority, PostRulesResourceInner resource, Context context) { + PostRulesResourceInner inner = + this.serviceClient().createOrUpdate(globalRulestackName, priority, resource, context); + if (inner != null) { + return new PostRulesResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String globalRulestackName, String priority) { + this.serviceClient().delete(globalRulestackName, priority); + } + + public void delete(String globalRulestackName, String priority, Context context) { + this.serviceClient().delete(globalRulestackName, priority, context); + } + + public Response getCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context) { + Response inner = + this.serviceClient().getCountersWithResponse(globalRulestackName, priority, firewallName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RuleCounterImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RuleCounter getCounters(String globalRulestackName, String priority) { + RuleCounterInner inner = this.serviceClient().getCounters(globalRulestackName, priority); + if (inner != null) { + return new RuleCounterImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response refreshCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context) { + return this.serviceClient().refreshCountersWithResponse(globalRulestackName, priority, firewallName, context); + } + + public void refreshCounters(String globalRulestackName, String priority) { + this.serviceClient().refreshCounters(globalRulestackName, priority); + } + + public Response resetCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context) { + Response inner = + this.serviceClient().resetCountersWithResponse(globalRulestackName, priority, firewallName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RuleCounterResetImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RuleCounterReset resetCounters(String globalRulestackName, String priority) { + RuleCounterResetInner inner = this.serviceClient().resetCounters(globalRulestackName, priority); + if (inner != null) { + return new RuleCounterResetImpl(inner, this.manager()); + } else { + return null; + } + } + + private PostRulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PostRulesResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PostRulesResourceImpl.java new file mode 100644 index 000000000000..9045d6604a06 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PostRulesResourceImpl.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PostRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.PostRulesResource; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import java.util.Collections; +import java.util.List; + +public final class PostRulesResourceImpl implements PostRulesResource { + private PostRulesResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + PostRulesResourceImpl( + PostRulesResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = 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 String etag() { + return this.innerModel().etag(); + } + + public String ruleName() { + return this.innerModel().ruleName(); + } + + public Integer priority() { + return this.innerModel().priority(); + } + + public String description() { + return this.innerModel().description(); + } + + public StateEnum ruleState() { + return this.innerModel().ruleState(); + } + + public SourceAddr source() { + return this.innerModel().source(); + } + + public BooleanEnum negateSource() { + return this.innerModel().negateSource(); + } + + public DestinationAddr destination() { + return this.innerModel().destination(); + } + + public BooleanEnum negateDestination() { + return this.innerModel().negateDestination(); + } + + public List applications() { + List inner = this.innerModel().applications(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Category category() { + return this.innerModel().category(); + } + + public String protocol() { + return this.innerModel().protocol(); + } + + public List protocolPortList() { + List inner = this.innerModel().protocolPortList(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String inboundInspectionCertificate() { + return this.innerModel().inboundInspectionCertificate(); + } + + public String auditComment() { + return this.innerModel().auditComment(); + } + + public ActionEnum actionType() { + return this.innerModel().actionType(); + } + + public StateEnum enableLogging() { + return this.innerModel().enableLogging(); + } + + public DecryptionRuleTypeEnum decryptionRuleType() { + return this.innerModel().decryptionRuleType(); + } + + public List tags() { + List inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PostRulesResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PreRulesClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PreRulesClientImpl.java new file mode 100644 index 000000000000..b6b455b9d041 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PreRulesClientImpl.java @@ -0,0 +1,1375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.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.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.paloaltonetworks.fluent.PreRulesClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PreRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterResetInner; +import com.azure.resourcemanager.paloaltonetworks.models.PreRulesResourceListResult; +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 PreRulesClient. */ +public final class PreRulesClientImpl implements PreRulesClient { + /** The proxy service used to perform REST calls. */ + private final PreRulesService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of PreRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PreRulesClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = RestProxy.create(PreRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwPreRules to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface PreRulesService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("priority") String priority, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("priority") String priority, + @BodyParam("application/json") PreRulesResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("priority") String priority, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/getCounters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getCounters( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("priority") String priority, + @QueryParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/refreshCounters") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> refreshCounters( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("priority") String priority, + @QueryParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/resetCounters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> resetCounters( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("priority") String priority, + @QueryParam("firewallName") String firewallName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List PreRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PreRulesResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String globalRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + 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 PreRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PreRulesResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String globalRulestackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName 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(), globalRulestackName, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List PreRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PreRulesResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String globalRulestackName) { + return new PagedFlux<>( + () -> listSinglePageAsync(globalRulestackName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List PreRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PreRulesResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String globalRulestackName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(globalRulestackName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List PreRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PreRulesResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String globalRulestackName) { + return new PagedIterable<>(listAsync(globalRulestackName)); + } + + /** + * List PreRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PreRulesResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String globalRulestackName, Context context) { + return new PagedIterable<>(listAsync(globalRulestackName, context)); + } + + /** + * Get a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PreRulesResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String globalRulestackName, String priority) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PreRulesResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String globalRulestackName, String priority, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, priority, accept, context); + } + + /** + * Get a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PreRulesResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String globalRulestackName, String priority) { + return getWithResponseAsync(globalRulestackName, priority).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PreRulesResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String globalRulestackName, String priority, Context context) { + return getWithResponseAsync(globalRulestackName, priority, context).block(); + } + + /** + * Get a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PreRulesResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PreRulesResourceInner get(String globalRulestackName, String priority) { + return getWithResponse(globalRulestackName, priority, Context.NONE).getValue(); + } + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String globalRulestackName, String priority, PreRulesResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String globalRulestackName, String priority, PreRulesResourceInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + resource, + accept, + context); + } + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PreRulesResourceInner> beginCreateOrUpdateAsync( + String globalRulestackName, String priority, PreRulesResourceInner resource) { + Mono>> mono = + createOrUpdateWithResponseAsync(globalRulestackName, priority, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PreRulesResourceInner.class, + PreRulesResourceInner.class, + this.client.getContext()); + } + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 PollerFlux} for polling of preRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PreRulesResourceInner> beginCreateOrUpdateAsync( + String globalRulestackName, String priority, PreRulesResourceInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(globalRulestackName, priority, resource, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), PreRulesResourceInner.class, PreRulesResourceInner.class, context); + } + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PreRulesResourceInner> beginCreateOrUpdate( + String globalRulestackName, String priority, PreRulesResourceInner resource) { + return this.beginCreateOrUpdateAsync(globalRulestackName, priority, resource).getSyncPoller(); + } + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PreRulesResourceInner> beginCreateOrUpdate( + String globalRulestackName, String priority, PreRulesResourceInner resource, Context context) { + return this.beginCreateOrUpdateAsync(globalRulestackName, priority, resource, context).getSyncPoller(); + } + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String globalRulestackName, String priority, PreRulesResourceInner resource) { + return beginCreateOrUpdateAsync(globalRulestackName, priority, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String globalRulestackName, String priority, PreRulesResourceInner resource, Context context) { + return beginCreateOrUpdateAsync(globalRulestackName, priority, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PreRulesResourceInner createOrUpdate( + String globalRulestackName, String priority, PreRulesResourceInner resource) { + return createOrUpdateAsync(globalRulestackName, priority, resource).block(); + } + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PreRulesResourceInner createOrUpdate( + String globalRulestackName, String priority, PreRulesResourceInner resource, Context context) { + return createOrUpdateAsync(globalRulestackName, priority, resource, context).block(); + } + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String priority) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String priority, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, priority, accept, context); + } + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String priority) { + Mono>> mono = deleteWithResponseAsync(globalRulestackName, priority); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String priority, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(globalRulestackName, priority, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 globalRulestackName, String priority) { + return this.beginDeleteAsync(globalRulestackName, priority).getSyncPoller(); + } + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 globalRulestackName, String priority, Context context) { + return this.beginDeleteAsync(globalRulestackName, priority, context).getSyncPoller(); + } + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 globalRulestackName, String priority) { + return beginDeleteAsync(globalRulestackName, priority).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 globalRulestackName, String priority, Context context) { + return beginDeleteAsync(globalRulestackName, priority, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 globalRulestackName, String priority) { + deleteAsync(globalRulestackName, priority).block(); + } + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 globalRulestackName, String priority, Context context) { + deleteAsync(globalRulestackName, priority, context).block(); + } + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCountersWithResponseAsync( + String globalRulestackName, String priority, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCountersWithResponseAsync( + String globalRulestackName, String priority, String firewallName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + firewallName, + accept, + context); + } + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCountersAsync(String globalRulestackName, String priority) { + final String firewallName = null; + return getCountersWithResponseAsync(globalRulestackName, priority, firewallName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context) { + return getCountersWithResponseAsync(globalRulestackName, priority, firewallName, context).block(); + } + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RuleCounterInner getCounters(String globalRulestackName, String priority) { + final String firewallName = null; + return getCountersWithResponse(globalRulestackName, priority, firewallName, Context.NONE).getValue(); + } + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> refreshCountersWithResponseAsync( + String globalRulestackName, String priority, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .refreshCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> refreshCountersWithResponseAsync( + String globalRulestackName, String priority, String firewallName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .refreshCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + firewallName, + accept, + context); + } + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 refreshCountersAsync(String globalRulestackName, String priority) { + final String firewallName = null; + return refreshCountersWithResponseAsync(globalRulestackName, priority, firewallName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response refreshCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context) { + return refreshCountersWithResponseAsync(globalRulestackName, priority, firewallName, context).block(); + } + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 refreshCounters(String globalRulestackName, String priority) { + final String firewallName = null; + refreshCountersWithResponse(globalRulestackName, priority, firewallName, Context.NONE); + } + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetCountersWithResponseAsync( + String globalRulestackName, String priority, String firewallName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resetCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + firewallName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetCountersWithResponseAsync( + String globalRulestackName, String priority, String firewallName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (priority == null) { + return Mono.error(new IllegalArgumentException("Parameter priority is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resetCounters( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + priority, + firewallName, + accept, + context); + } + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetCountersAsync(String globalRulestackName, String priority) { + final String firewallName = null; + return resetCountersWithResponseAsync(globalRulestackName, priority, firewallName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resetCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context) { + return resetCountersWithResponseAsync(globalRulestackName, priority, firewallName, context).block(); + } + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RuleCounterResetInner resetCounters(String globalRulestackName, String priority) { + final String firewallName = null; + return resetCountersWithResponse(globalRulestackName, priority, firewallName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PreRulesResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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(), + 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PreRulesResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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.")); + } + 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)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PreRulesImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PreRulesImpl.java new file mode 100644 index 000000000000..093f7d346709 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PreRulesImpl.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.PreRulesClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PreRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterResetInner; +import com.azure.resourcemanager.paloaltonetworks.models.PreRules; +import com.azure.resourcemanager.paloaltonetworks.models.PreRulesResource; +import com.azure.resourcemanager.paloaltonetworks.models.RuleCounter; +import com.azure.resourcemanager.paloaltonetworks.models.RuleCounterReset; + +public final class PreRulesImpl implements PreRules { + private static final ClientLogger LOGGER = new ClientLogger(PreRulesImpl.class); + + private final PreRulesClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public PreRulesImpl( + PreRulesClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String globalRulestackName) { + PagedIterable inner = this.serviceClient().list(globalRulestackName); + return Utils.mapPage(inner, inner1 -> new PreRulesResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String globalRulestackName, Context context) { + PagedIterable inner = this.serviceClient().list(globalRulestackName, context); + return Utils.mapPage(inner, inner1 -> new PreRulesResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String globalRulestackName, String priority, Context context) { + Response inner = + this.serviceClient().getWithResponse(globalRulestackName, priority, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PreRulesResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PreRulesResource get(String globalRulestackName, String priority) { + PreRulesResourceInner inner = this.serviceClient().get(globalRulestackName, priority); + if (inner != null) { + return new PreRulesResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PreRulesResource createOrUpdate( + String globalRulestackName, String priority, PreRulesResourceInner resource) { + PreRulesResourceInner inner = this.serviceClient().createOrUpdate(globalRulestackName, priority, resource); + if (inner != null) { + return new PreRulesResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PreRulesResource createOrUpdate( + String globalRulestackName, String priority, PreRulesResourceInner resource, Context context) { + PreRulesResourceInner inner = + this.serviceClient().createOrUpdate(globalRulestackName, priority, resource, context); + if (inner != null) { + return new PreRulesResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String globalRulestackName, String priority) { + this.serviceClient().delete(globalRulestackName, priority); + } + + public void delete(String globalRulestackName, String priority, Context context) { + this.serviceClient().delete(globalRulestackName, priority, context); + } + + public Response getCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context) { + Response inner = + this.serviceClient().getCountersWithResponse(globalRulestackName, priority, firewallName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RuleCounterImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RuleCounter getCounters(String globalRulestackName, String priority) { + RuleCounterInner inner = this.serviceClient().getCounters(globalRulestackName, priority); + if (inner != null) { + return new RuleCounterImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response refreshCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context) { + return this.serviceClient().refreshCountersWithResponse(globalRulestackName, priority, firewallName, context); + } + + public void refreshCounters(String globalRulestackName, String priority) { + this.serviceClient().refreshCounters(globalRulestackName, priority); + } + + public Response resetCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context) { + Response inner = + this.serviceClient().resetCountersWithResponse(globalRulestackName, priority, firewallName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RuleCounterResetImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RuleCounterReset resetCounters(String globalRulestackName, String priority) { + RuleCounterResetInner inner = this.serviceClient().resetCounters(globalRulestackName, priority); + if (inner != null) { + return new RuleCounterResetImpl(inner, this.manager()); + } else { + return null; + } + } + + private PreRulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PreRulesResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PreRulesResourceImpl.java new file mode 100644 index 000000000000..2579d84b4f1a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PreRulesResourceImpl.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PreRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.PreRulesResource; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import java.util.Collections; +import java.util.List; + +public final class PreRulesResourceImpl implements PreRulesResource { + private PreRulesResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + PreRulesResourceImpl( + PreRulesResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = 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 String etag() { + return this.innerModel().etag(); + } + + public String ruleName() { + return this.innerModel().ruleName(); + } + + public Integer priority() { + return this.innerModel().priority(); + } + + public String description() { + return this.innerModel().description(); + } + + public StateEnum ruleState() { + return this.innerModel().ruleState(); + } + + public SourceAddr source() { + return this.innerModel().source(); + } + + public BooleanEnum negateSource() { + return this.innerModel().negateSource(); + } + + public DestinationAddr destination() { + return this.innerModel().destination(); + } + + public BooleanEnum negateDestination() { + return this.innerModel().negateDestination(); + } + + public List applications() { + List inner = this.innerModel().applications(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Category category() { + return this.innerModel().category(); + } + + public String protocol() { + return this.innerModel().protocol(); + } + + public List protocolPortList() { + List inner = this.innerModel().protocolPortList(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String inboundInspectionCertificate() { + return this.innerModel().inboundInspectionCertificate(); + } + + public String auditComment() { + return this.innerModel().auditComment(); + } + + public ActionEnum actionType() { + return this.innerModel().actionType(); + } + + public StateEnum enableLogging() { + return this.innerModel().enableLogging(); + } + + public DecryptionRuleTypeEnum decryptionRuleType() { + return this.innerModel().decryptionRuleType(); + } + + public List tags() { + List inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PreRulesResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PredefinedUrlCategoriesResponseImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PredefinedUrlCategoriesResponseImpl.java new file mode 100644 index 000000000000..b52d538205a5 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PredefinedUrlCategoriesResponseImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PredefinedUrlCategoriesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.models.PredefinedUrlCategoriesResponse; +import com.azure.resourcemanager.paloaltonetworks.models.PredefinedUrlCategory; +import java.util.Collections; +import java.util.List; + +public final class PredefinedUrlCategoriesResponseImpl implements PredefinedUrlCategoriesResponse { + private PredefinedUrlCategoriesResponseInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + PredefinedUrlCategoriesResponseImpl( + PredefinedUrlCategoriesResponseInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public PredefinedUrlCategoriesResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListGlobalRulestackResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListGlobalRulestackResourceImpl.java new file mode 100644 index 000000000000..17eff1342007 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListGlobalRulestackResourceImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListGlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.PrefixListGlobalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import java.util.Collections; +import java.util.List; + +public final class PrefixListGlobalRulestackResourceImpl implements PrefixListGlobalRulestackResource { + private PrefixListGlobalRulestackResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + PrefixListGlobalRulestackResourceImpl( + PrefixListGlobalRulestackResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = 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 String description() { + return this.innerModel().description(); + } + + public List prefixList() { + List inner = this.innerModel().prefixList(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String etag() { + return this.innerModel().etag(); + } + + public String auditComment() { + return this.innerModel().auditComment(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PrefixListGlobalRulestackResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListGlobalRulestacksClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListGlobalRulestacksClientImpl.java new file mode 100644 index 000000000000..dc4fb86e0419 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListGlobalRulestacksClientImpl.java @@ -0,0 +1,939 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.PathParam; +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.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.paloaltonetworks.fluent.PrefixListGlobalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListGlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.PrefixListGlobalRulestackResourceListResult; +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 PrefixListGlobalRulestacksClient. */ +public final class PrefixListGlobalRulestacksClientImpl implements PrefixListGlobalRulestacksClient { + /** The proxy service used to perform REST calls. */ + private final PrefixListGlobalRulestacksService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of PrefixListGlobalRulestacksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrefixListGlobalRulestacksClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy + .create( + PrefixListGlobalRulestacksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwPrefixListGlobalRulestacks to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface PrefixListGlobalRulestacksService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("name") String name, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("name") String name, + @BodyParam("application/json") PrefixListGlobalRulestackResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("globalRulestackName") String globalRulestackName, + @PathParam("name") String name, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List PrefixListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListGlobalRulestackResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String globalRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + 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 PrefixListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListGlobalRulestackResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String globalRulestackName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName 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(), globalRulestackName, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List PrefixListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListGlobalRulestackResource list operation as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String globalRulestackName) { + return new PagedFlux<>( + () -> listSinglePageAsync(globalRulestackName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List PrefixListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListGlobalRulestackResource list operation as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String globalRulestackName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(globalRulestackName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List PrefixListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListGlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String globalRulestackName) { + return new PagedIterable<>(listAsync(globalRulestackName)); + } + + /** + * List PrefixListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListGlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String globalRulestackName, Context context) { + return new PagedIterable<>(listAsync(globalRulestackName, context)); + } + + /** + * Get a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PrefixListGlobalRulestackResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String globalRulestackName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PrefixListGlobalRulestackResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String globalRulestackName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get(this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, name, accept, context); + } + + /** + * Get a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PrefixListGlobalRulestackResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String globalRulestackName, String name) { + return getWithResponseAsync(globalRulestackName, name).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PrefixListGlobalRulestackResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String globalRulestackName, String name, Context context) { + return getWithResponseAsync(globalRulestackName, name, context).block(); + } + + /** + * Get a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PrefixListGlobalRulestackResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrefixListGlobalRulestackResourceInner get(String globalRulestackName, String name) { + return getWithResponse(globalRulestackName, name, Context.NONE).getValue(); + } + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + name, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + name, + resource, + accept, + context); + } + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrefixListGlobalRulestackResourceInner> + beginCreateOrUpdateAsync( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(globalRulestackName, name, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PrefixListGlobalRulestackResourceInner.class, + PrefixListGlobalRulestackResourceInner.class, + this.client.getContext()); + } + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 PollerFlux} for polling of globalRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrefixListGlobalRulestackResourceInner> + beginCreateOrUpdateAsync( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(globalRulestackName, name, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PrefixListGlobalRulestackResourceInner.class, + PrefixListGlobalRulestackResourceInner.class, + context); + } + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrefixListGlobalRulestackResourceInner> + beginCreateOrUpdate(String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource) { + return this.beginCreateOrUpdateAsync(globalRulestackName, name, resource).getSyncPoller(); + } + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrefixListGlobalRulestackResourceInner> + beginCreateOrUpdate( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource, Context context) { + return this.beginCreateOrUpdateAsync(globalRulestackName, name, resource, context).getSyncPoller(); + } + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource) { + return beginCreateOrUpdateAsync(globalRulestackName, name, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource, Context context) { + return beginCreateOrUpdateAsync(globalRulestackName, name, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrefixListGlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource) { + return createOrUpdateAsync(globalRulestackName, name, resource).block(); + } + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrefixListGlobalRulestackResourceInner createOrUpdate( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource, Context context) { + return createOrUpdateAsync(globalRulestackName, name, resource, context).block(); + } + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + globalRulestackName, + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (globalRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter globalRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete(this.client.getEndpoint(), this.client.getApiVersion(), globalRulestackName, name, accept, context); + } + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String name) { + Mono>> mono = deleteWithResponseAsync(globalRulestackName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 globalRulestackName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(globalRulestackName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 globalRulestackName, String name) { + return this.beginDeleteAsync(globalRulestackName, name).getSyncPoller(); + } + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 globalRulestackName, String name, Context context) { + return this.beginDeleteAsync(globalRulestackName, name, context).getSyncPoller(); + } + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 globalRulestackName, String name) { + return beginDeleteAsync(globalRulestackName, name).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 globalRulestackName, String name, Context context) { + return beginDeleteAsync(globalRulestackName, name, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 globalRulestackName, String name) { + deleteAsync(globalRulestackName, name).block(); + } + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 globalRulestackName, String name, Context context) { + deleteAsync(globalRulestackName, name, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListGlobalRulestackResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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(), + 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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListGlobalRulestackResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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.")); + } + 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)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListGlobalRulestacksImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListGlobalRulestacksImpl.java new file mode 100644 index 000000000000..6fe52c70f131 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListGlobalRulestacksImpl.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.PrefixListGlobalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListGlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.PrefixListGlobalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.PrefixListGlobalRulestacks; + +public final class PrefixListGlobalRulestacksImpl implements PrefixListGlobalRulestacks { + private static final ClientLogger LOGGER = new ClientLogger(PrefixListGlobalRulestacksImpl.class); + + private final PrefixListGlobalRulestacksClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public PrefixListGlobalRulestacksImpl( + PrefixListGlobalRulestacksClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String globalRulestackName) { + PagedIterable inner = this.serviceClient().list(globalRulestackName); + return Utils.mapPage(inner, inner1 -> new PrefixListGlobalRulestackResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String globalRulestackName, Context context) { + PagedIterable inner = + this.serviceClient().list(globalRulestackName, context); + return Utils.mapPage(inner, inner1 -> new PrefixListGlobalRulestackResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String globalRulestackName, String name, Context context) { + Response inner = + this.serviceClient().getWithResponse(globalRulestackName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrefixListGlobalRulestackResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrefixListGlobalRulestackResource get(String globalRulestackName, String name) { + PrefixListGlobalRulestackResourceInner inner = this.serviceClient().get(globalRulestackName, name); + if (inner != null) { + return new PrefixListGlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PrefixListGlobalRulestackResource createOrUpdate( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource) { + PrefixListGlobalRulestackResourceInner inner = + this.serviceClient().createOrUpdate(globalRulestackName, name, resource); + if (inner != null) { + return new PrefixListGlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PrefixListGlobalRulestackResource createOrUpdate( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource, Context context) { + PrefixListGlobalRulestackResourceInner inner = + this.serviceClient().createOrUpdate(globalRulestackName, name, resource, context); + if (inner != null) { + return new PrefixListGlobalRulestackResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String globalRulestackName, String name) { + this.serviceClient().delete(globalRulestackName, name); + } + + public void delete(String globalRulestackName, String name, Context context) { + this.serviceClient().delete(globalRulestackName, name, context); + } + + private PrefixListGlobalRulestacksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListLocalRulestacksClientImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListLocalRulestacksClientImpl.java new file mode 100644 index 000000000000..056818dc2875 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListLocalRulestacksClientImpl.java @@ -0,0 +1,1125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.PathParam; +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.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.paloaltonetworks.fluent.PrefixListLocalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.PrefixListResourceListResult; +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 PrefixListLocalRulestacksClient. */ +public final class PrefixListLocalRulestacksClientImpl implements PrefixListLocalRulestacksClient { + /** The proxy service used to perform REST calls. */ + private final PrefixListLocalRulestacksService service; + + /** The service client containing this operation class. */ + private final PaloAltoNetworksCloudngfwImpl client; + + /** + * Initializes an instance of PrefixListLocalRulestacksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrefixListLocalRulestacksClientImpl(PaloAltoNetworksCloudngfwImpl client) { + this.service = + RestProxy + .create( + PrefixListLocalRulestacksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PaloAltoNetworksCloudngfwPrefixListLocalRulestacks to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PaloAltoNetworksClou") + public interface PrefixListLocalRulestacksService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocalRulestacks( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("name") String name, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("name") String name, + @BodyParam("application/json") PrefixListResourceInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists/{name}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("localRulestackName") String localRulestackName, + @PathParam("name") String name, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocalRulestacksNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List PrefixListResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksSinglePageAsync( + String resourceGroupName, String localRulestackName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByLocalRulestacks( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + 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 PrefixListResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksSinglePageAsync( + String resourceGroupName, String localRulestackName, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByLocalRulestacks( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List PrefixListResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocalRulestacksAsync( + String resourceGroupName, String localRulestackName) { + return new PagedFlux<>( + () -> listByLocalRulestacksSinglePageAsync(resourceGroupName, localRulestackName), + nextLink -> listByLocalRulestacksNextSinglePageAsync(nextLink)); + } + + /** + * List PrefixListResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocalRulestacksAsync( + String resourceGroupName, String localRulestackName, Context context) { + return new PagedFlux<>( + () -> listByLocalRulestacksSinglePageAsync(resourceGroupName, localRulestackName, context), + nextLink -> listByLocalRulestacksNextSinglePageAsync(nextLink, context)); + } + + /** + * List PrefixListResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName) { + return new PagedIterable<>(listByLocalRulestacksAsync(resourceGroupName, localRulestackName)); + } + + /** + * List PrefixListResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context) { + return new PagedIterable<>(listByLocalRulestacksAsync(resourceGroupName, localRulestackName, context)); + } + + /** + * Get a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PrefixListResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String localRulestackName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PrefixListResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String localRulestackName, String name, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + accept, + context); + } + + /** + * Get a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PrefixListResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String localRulestackName, String name) { + return getWithResponseAsync(resourceGroupName, localRulestackName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PrefixListResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String localRulestackName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, localRulestackName, name, context).block(); + } + + /** + * Get a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 PrefixListResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrefixListResourceInner get(String resourceGroupName, String localRulestackName, String name) { + return getWithResponse(resourceGroupName, localRulestackName, name, Context.NONE).getValue(); + } + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String localRulestackName, String name, PrefixListResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String localRulestackName, + String name, + PrefixListResourceInner resource, + 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + resource, + accept, + context); + } + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrefixListResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String localRulestackName, String name, PrefixListResourceInner resource) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, localRulestackName, name, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PrefixListResourceInner.class, + PrefixListResourceInner.class, + this.client.getContext()); + } + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 PollerFlux} for polling of localRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrefixListResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String localRulestackName, + String name, + PrefixListResourceInner resource, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, localRulestackName, name, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PrefixListResourceInner.class, + PrefixListResourceInner.class, + context); + } + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrefixListResourceInner> beginCreateOrUpdate( + String resourceGroupName, String localRulestackName, String name, PrefixListResourceInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, name, resource).getSyncPoller(); + } + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrefixListResourceInner> beginCreateOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + PrefixListResourceInner resource, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, name, resource, context) + .getSyncPoller(); + } + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String localRulestackName, String name, PrefixListResourceInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, name, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String localRulestackName, + String name, + PrefixListResourceInner resource, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, localRulestackName, name, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrefixListResourceInner createOrUpdate( + String resourceGroupName, String localRulestackName, String name, PrefixListResourceInner resource) { + return createOrUpdateAsync(resourceGroupName, localRulestackName, name, resource).block(); + } + + /** + * Create a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 localRulestack prefixList. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrefixListResourceInner createOrUpdate( + String resourceGroupName, + String localRulestackName, + String name, + PrefixListResourceInner resource, + Context context) { + return createOrUpdateAsync(resourceGroupName, localRulestackName, name, resource, context).block(); + } + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String name, 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 (localRulestackName == null) { + return Mono + .error(new IllegalArgumentException("Parameter localRulestackName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + localRulestackName, + name, + accept, + context); + } + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, localRulestackName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 localRulestackName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, localRulestackName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 localRulestackName, String name) { + return this.beginDeleteAsync(resourceGroupName, localRulestackName, name).getSyncPoller(); + } + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 localRulestackName, String name, Context context) { + return this.beginDeleteAsync(resourceGroupName, localRulestackName, name, context).getSyncPoller(); + } + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 localRulestackName, String name) { + return beginDeleteAsync(resourceGroupName, localRulestackName, name) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 localRulestackName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, localRulestackName, name, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 localRulestackName, String name) { + deleteAsync(resourceGroupName, localRulestackName, name).block(); + } + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 localRulestackName, String name, Context context) { + deleteAsync(resourceGroupName, localRulestackName, name, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksNextSinglePageAsync(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.listByLocalRulestacksNext(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 + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 PrefixListResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocalRulestacksNextSinglePageAsync( + 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 + .listByLocalRulestacksNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListLocalRulestacksImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListLocalRulestacksImpl.java new file mode 100644 index 000000000000..2b5779d18e17 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListLocalRulestacksImpl.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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.paloaltonetworks.fluent.PrefixListLocalRulestacksClient; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.PrefixListLocalRulestacks; +import com.azure.resourcemanager.paloaltonetworks.models.PrefixListResource; + +public final class PrefixListLocalRulestacksImpl implements PrefixListLocalRulestacks { + private static final ClientLogger LOGGER = new ClientLogger(PrefixListLocalRulestacksImpl.class); + + private final PrefixListLocalRulestacksClient innerClient; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + public PrefixListLocalRulestacksImpl( + PrefixListLocalRulestacksClient innerClient, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName) { + PagedIterable inner = + this.serviceClient().listByLocalRulestacks(resourceGroupName, localRulestackName); + return Utils.mapPage(inner, inner1 -> new PrefixListResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context) { + PagedIterable inner = + this.serviceClient().listByLocalRulestacks(resourceGroupName, localRulestackName, context); + return Utils.mapPage(inner, inner1 -> new PrefixListResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String localRulestackName, String name, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, localRulestackName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrefixListResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrefixListResource get(String resourceGroupName, String localRulestackName, String name) { + PrefixListResourceInner inner = this.serviceClient().get(resourceGroupName, localRulestackName, name); + if (inner != null) { + return new PrefixListResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String localRulestackName, String name) { + this.serviceClient().delete(resourceGroupName, localRulestackName, name); + } + + public void delete(String resourceGroupName, String localRulestackName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, localRulestackName, name, context); + } + + public PrefixListResource getById(String id) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String name = Utils.getValueFromIdByName(id, "prefixlists"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'prefixlists'.", id))); + } + return this.getWithResponse(resourceGroupName, localRulestackName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String name = Utils.getValueFromIdByName(id, "prefixlists"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'prefixlists'.", id))); + } + return this.getWithResponse(resourceGroupName, localRulestackName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String name = Utils.getValueFromIdByName(id, "prefixlists"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'prefixlists'.", id))); + } + this.delete(resourceGroupName, localRulestackName, name, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 localRulestackName = Utils.getValueFromIdByName(id, "localRulestacks"); + if (localRulestackName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'localRulestacks'.", id))); + } + String name = Utils.getValueFromIdByName(id, "prefixlists"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'prefixlists'.", id))); + } + this.delete(resourceGroupName, localRulestackName, name, context); + } + + private PrefixListLocalRulestacksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } + + public PrefixListResourceImpl define(String name) { + return new PrefixListResourceImpl(name, this.manager()); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListResourceImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListResourceImpl.java new file mode 100644 index 000000000000..d68091f64f8d --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/PrefixListResourceImpl.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.PrefixListResource; +import com.azure.resourcemanager.paloaltonetworks.models.ProvisioningState; +import java.util.Collections; +import java.util.List; + +public final class PrefixListResourceImpl + implements PrefixListResource, PrefixListResource.Definition, PrefixListResource.Update { + private PrefixListResourceInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager 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 String description() { + return this.innerModel().description(); + } + + public List prefixList() { + List inner = this.innerModel().prefixList(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String etag() { + return this.innerModel().etag(); + } + + public String auditComment() { + return this.innerModel().auditComment(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PrefixListResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String localRulestackName; + + private String name; + + public PrefixListResourceImpl withExistingLocalRulestack(String resourceGroupName, String localRulestackName) { + this.resourceGroupName = resourceGroupName; + this.localRulestackName = localRulestackName; + return this; + } + + public PrefixListResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getPrefixListLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, name, this.innerModel(), Context.NONE); + return this; + } + + public PrefixListResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPrefixListLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, name, this.innerModel(), context); + return this; + } + + PrefixListResourceImpl( + String name, com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = new PrefixListResourceInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public PrefixListResourceImpl update() { + return this; + } + + public PrefixListResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getPrefixListLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, name, this.innerModel(), Context.NONE); + return this; + } + + public PrefixListResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPrefixListLocalRulestacks() + .createOrUpdate(resourceGroupName, localRulestackName, name, this.innerModel(), context); + return this; + } + + PrefixListResourceImpl( + PrefixListResourceInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.localRulestackName = Utils.getValueFromIdByName(innerObject.id(), "localRulestacks"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "prefixlists"); + } + + public PrefixListResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getPrefixListLocalRulestacks() + .getWithResponse(resourceGroupName, localRulestackName, name, Context.NONE) + .getValue(); + return this; + } + + public PrefixListResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPrefixListLocalRulestacks() + .getWithResponse(resourceGroupName, localRulestackName, name, context) + .getValue(); + return this; + } + + public PrefixListResourceImpl withPrefixList(List prefixList) { + this.innerModel().withPrefixList(prefixList); + return this; + } + + public PrefixListResourceImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public PrefixListResourceImpl withEtag(String etag) { + this.innerModel().withEtag(etag); + return this; + } + + public PrefixListResourceImpl withAuditComment(String auditComment) { + this.innerModel().withAuditComment(auditComment); + return this; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/RuleCounterImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/RuleCounterImpl.java new file mode 100644 index 000000000000..9c7c8e7e7dc4 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/RuleCounterImpl.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterInner; +import com.azure.resourcemanager.paloaltonetworks.models.AppSeenData; +import com.azure.resourcemanager.paloaltonetworks.models.RuleCounter; +import java.time.OffsetDateTime; + +public final class RuleCounterImpl implements RuleCounter { + private RuleCounterInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + RuleCounterImpl( + RuleCounterInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String priority() { + return this.innerModel().priority(); + } + + public String ruleStackName() { + return this.innerModel().ruleStackName(); + } + + public String ruleListName() { + return this.innerModel().ruleListName(); + } + + public String firewallName() { + return this.innerModel().firewallName(); + } + + public String ruleName() { + return this.innerModel().ruleName(); + } + + public Integer hitCount() { + return this.innerModel().hitCount(); + } + + public AppSeenData appSeen() { + return this.innerModel().appSeen(); + } + + public OffsetDateTime timestamp() { + return this.innerModel().timestamp(); + } + + public OffsetDateTime requestTimestamp() { + return this.innerModel().requestTimestamp(); + } + + public OffsetDateTime lastUpdatedTimestamp() { + return this.innerModel().lastUpdatedTimestamp(); + } + + public RuleCounterInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/RuleCounterResetImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/RuleCounterResetImpl.java new file mode 100644 index 000000000000..8fbb2d79673b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/RuleCounterResetImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterResetInner; +import com.azure.resourcemanager.paloaltonetworks.models.RuleCounterReset; + +public final class RuleCounterResetImpl implements RuleCounterReset { + private RuleCounterResetInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + RuleCounterResetImpl( + RuleCounterResetInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String priority() { + return this.innerModel().priority(); + } + + public String ruleStackName() { + return this.innerModel().ruleStackName(); + } + + public String ruleListName() { + return this.innerModel().ruleListName(); + } + + public String firewallName() { + return this.innerModel().firewallName(); + } + + public String ruleName() { + return this.innerModel().ruleName(); + } + + public RuleCounterResetInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/SecurityServicesResponseImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/SecurityServicesResponseImpl.java new file mode 100644 index 000000000000..cfad0c242e36 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/SecurityServicesResponseImpl.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SecurityServicesResponseInner; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesResponse; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesTypeList; + +public final class SecurityServicesResponseImpl implements SecurityServicesResponse { + private SecurityServicesResponseInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + SecurityServicesResponseImpl( + SecurityServicesResponseInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public SecurityServicesTypeList value() { + return this.innerModel().value(); + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public SecurityServicesResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/SupportInfoImpl.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/SupportInfoImpl.java new file mode 100644 index 000000000000..7a9b8e152f68 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/SupportInfoImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SupportInfoInner; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.SupportInfo; + +public final class SupportInfoImpl implements SupportInfo { + private SupportInfoInner innerObject; + + private final com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager; + + SupportInfoImpl( + SupportInfoInner innerObject, + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String productSku() { + return this.innerModel().productSku(); + } + + public String productSerial() { + return this.innerModel().productSerial(); + } + + public BooleanEnum accountRegistered() { + return this.innerModel().accountRegistered(); + } + + public String accountId() { + return this.innerModel().accountId(); + } + + public BooleanEnum userDomainSupported() { + return this.innerModel().userDomainSupported(); + } + + public BooleanEnum userRegistered() { + return this.innerModel().userRegistered(); + } + + public BooleanEnum freeTrial() { + return this.innerModel().freeTrial(); + } + + public Integer freeTrialDaysLeft() { + return this.innerModel().freeTrialDaysLeft(); + } + + public Integer freeTrialCreditLeft() { + return this.innerModel().freeTrialCreditLeft(); + } + + public String helpUrl() { + return this.innerModel().helpUrl(); + } + + public String supportUrl() { + return this.innerModel().supportUrl(); + } + + public String registerUrl() { + return this.innerModel().registerUrl(); + } + + public SupportInfoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/Utils.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/Utils.java new file mode 100644 index 000000000000..54922338f90e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/Utils.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.implementation; + +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.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class Utils { + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (segments.size() > 0 && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super( + PagedFlux + .create( + () -> + (continuationToken, pageSize) -> + Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> + new PagedResponseBase( + page.getRequest(), + page.getStatusCode(), + page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), + page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/package-info.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/package-info.java new file mode 100644 index 000000000000..a30b15ec0b77 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/implementation/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the implementations for PaloAltoNetworksCloudngfw. null. */ +package com.azure.resourcemanager.paloaltonetworks.implementation; diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ActionEnum.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ActionEnum.java new file mode 100644 index 000000000000..d32480f8fda7 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ActionEnum.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ActionEnum. */ +public final class ActionEnum extends ExpandableStringEnum { + /** Static value Allow for ActionEnum. */ + public static final ActionEnum ALLOW = fromString("Allow"); + + /** Static value DenySilent for ActionEnum. */ + public static final ActionEnum DENY_SILENT = fromString("DenySilent"); + + /** Static value DenyResetServer for ActionEnum. */ + public static final ActionEnum DENY_RESET_SERVER = fromString("DenyResetServer"); + + /** Static value DenyResetBoth for ActionEnum. */ + public static final ActionEnum DENY_RESET_BOTH = fromString("DenyResetBoth"); + + /** + * Creates a new instance of ActionEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionEnum() { + } + + /** + * Creates or finds a ActionEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionEnum. + */ + @JsonCreator + public static ActionEnum fromString(String name) { + return fromString(name, ActionEnum.class); + } + + /** + * Gets known ActionEnum values. + * + * @return known ActionEnum values. + */ + public static Collection values() { + return values(ActionEnum.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ActionType.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ActionType.java new file mode 100644 index 000000000000..1a61c30c2b10 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ActionType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** 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. */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AdvSecurityObjectListResponse.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AdvSecurityObjectListResponse.java new file mode 100644 index 000000000000..973bcd4d10ba --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AdvSecurityObjectListResponse.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.AdvSecurityObjectListResponseInner; + +/** An immutable client-side representation of AdvSecurityObjectListResponse. */ +public interface AdvSecurityObjectListResponse { + /** + * Gets the value property: response value. + * + * @return the value value. + */ + AdvSecurityObjectModel value(); + + /** + * Gets the nextLink property: next link. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.AdvSecurityObjectListResponseInner + * object. + * + * @return the inner object. + */ + AdvSecurityObjectListResponseInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AdvSecurityObjectModel.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AdvSecurityObjectModel.java new file mode 100644 index 000000000000..f43f98964a44 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AdvSecurityObjectModel.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of custom and predefined url category. */ +@Fluent +public final class AdvSecurityObjectModel { + /* + * type of object + */ + @JsonProperty(value = "type") + private String type; + + /* + * URL entry + */ + @JsonProperty(value = "entry", required = true) + private List entry; + + /** Creates an instance of AdvSecurityObjectModel class. */ + public AdvSecurityObjectModel() { + } + + /** + * Get the type property: type of object. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: type of object. + * + * @param type the type value to set. + * @return the AdvSecurityObjectModel object itself. + */ + public AdvSecurityObjectModel withType(String type) { + this.type = type; + return this; + } + + /** + * Get the entry property: URL entry. + * + * @return the entry value. + */ + public List entry() { + return this.entry; + } + + /** + * Set the entry property: URL entry. + * + * @param entry the entry value to set. + * @return the AdvSecurityObjectModel object itself. + */ + public AdvSecurityObjectModel withEntry(List entry) { + this.entry = entry; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (entry() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property entry in model AdvSecurityObjectModel")); + } else { + entry().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AdvSecurityObjectModel.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AdvSecurityObjectTypeEnum.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AdvSecurityObjectTypeEnum.java new file mode 100644 index 000000000000..854eaf831238 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AdvSecurityObjectTypeEnum.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AdvSecurityObjectTypeEnum. */ +public final class AdvSecurityObjectTypeEnum extends ExpandableStringEnum { + /** Static value urlCustom for AdvSecurityObjectTypeEnum. */ + public static final AdvSecurityObjectTypeEnum URL_CUSTOM = fromString("urlCustom"); + + /** Static value feeds for AdvSecurityObjectTypeEnum. */ + public static final AdvSecurityObjectTypeEnum FEEDS = fromString("feeds"); + + /** + * Creates a new instance of AdvSecurityObjectTypeEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AdvSecurityObjectTypeEnum() { + } + + /** + * Creates or finds a AdvSecurityObjectTypeEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding AdvSecurityObjectTypeEnum. + */ + @JsonCreator + public static AdvSecurityObjectTypeEnum fromString(String name) { + return fromString(name, AdvSecurityObjectTypeEnum.class); + } + + /** + * Gets known AdvSecurityObjectTypeEnum values. + * + * @return known AdvSecurityObjectTypeEnum values. + */ + public static Collection values() { + return values(AdvSecurityObjectTypeEnum.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AppSeenData.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AppSeenData.java new file mode 100644 index 000000000000..4abda59dba4a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AppSeenData.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Data Type for App Seen. */ +@Fluent +public final class AppSeenData { + /* + * number of rows + */ + @JsonProperty(value = "count", required = true) + private int count; + + /* + * array of appSeen + */ + @JsonProperty(value = "appSeenList", required = true) + private List appSeenList; + + /** Creates an instance of AppSeenData class. */ + public AppSeenData() { + } + + /** + * Get the count property: number of rows. + * + * @return the count value. + */ + public int count() { + return this.count; + } + + /** + * Set the count property: number of rows. + * + * @param count the count value to set. + * @return the AppSeenData object itself. + */ + public AppSeenData withCount(int count) { + this.count = count; + return this; + } + + /** + * Get the appSeenList property: array of appSeen. + * + * @return the appSeenList value. + */ + public List appSeenList() { + return this.appSeenList; + } + + /** + * Set the appSeenList property: array of appSeen. + * + * @param appSeenList the appSeenList value to set. + * @return the AppSeenData object itself. + */ + public AppSeenData withAppSeenList(List appSeenList) { + this.appSeenList = appSeenList; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (appSeenList() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property appSeenList in model AppSeenData")); + } else { + appSeenList().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AppSeenData.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AppSeenInfo.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AppSeenInfo.java new file mode 100644 index 000000000000..cc1db25414b7 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AppSeenInfo.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Definition for App Seen. */ +@Fluent +public final class AppSeenInfo { + /* + * title + */ + @JsonProperty(value = "title", required = true) + private String title; + + /* + * category + */ + @JsonProperty(value = "category", required = true) + private String category; + + /* + * subCategory + */ + @JsonProperty(value = "subCategory", required = true) + private String subCategory; + + /* + * risk + */ + @JsonProperty(value = "risk", required = true) + private String risk; + + /* + * tag + */ + @JsonProperty(value = "tag", required = true) + private String tag; + + /* + * technology + */ + @JsonProperty(value = "technology", required = true) + private String technology; + + /* + * standardPorts + */ + @JsonProperty(value = "standardPorts", required = true) + private String standardPorts; + + /** Creates an instance of AppSeenInfo class. */ + public AppSeenInfo() { + } + + /** + * Get the title property: title. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: title. + * + * @param title the title value to set. + * @return the AppSeenInfo object itself. + */ + public AppSeenInfo withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the category property: category. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Set the category property: category. + * + * @param category the category value to set. + * @return the AppSeenInfo object itself. + */ + public AppSeenInfo withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the subCategory property: subCategory. + * + * @return the subCategory value. + */ + public String subCategory() { + return this.subCategory; + } + + /** + * Set the subCategory property: subCategory. + * + * @param subCategory the subCategory value to set. + * @return the AppSeenInfo object itself. + */ + public AppSeenInfo withSubCategory(String subCategory) { + this.subCategory = subCategory; + return this; + } + + /** + * Get the risk property: risk. + * + * @return the risk value. + */ + public String risk() { + return this.risk; + } + + /** + * Set the risk property: risk. + * + * @param risk the risk value to set. + * @return the AppSeenInfo object itself. + */ + public AppSeenInfo withRisk(String risk) { + this.risk = risk; + return this; + } + + /** + * Get the tag property: tag. + * + * @return the tag value. + */ + public String tag() { + return this.tag; + } + + /** + * Set the tag property: tag. + * + * @param tag the tag value to set. + * @return the AppSeenInfo object itself. + */ + public AppSeenInfo withTag(String tag) { + this.tag = tag; + return this; + } + + /** + * Get the technology property: technology. + * + * @return the technology value. + */ + public String technology() { + return this.technology; + } + + /** + * Set the technology property: technology. + * + * @param technology the technology value to set. + * @return the AppSeenInfo object itself. + */ + public AppSeenInfo withTechnology(String technology) { + this.technology = technology; + return this; + } + + /** + * Get the standardPorts property: standardPorts. + * + * @return the standardPorts value. + */ + public String standardPorts() { + return this.standardPorts; + } + + /** + * Set the standardPorts property: standardPorts. + * + * @param standardPorts the standardPorts value to set. + * @return the AppSeenInfo object itself. + */ + public AppSeenInfo withStandardPorts(String standardPorts) { + this.standardPorts = standardPorts; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (title() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property title in model AppSeenInfo")); + } + if (category() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property category in model AppSeenInfo")); + } + if (subCategory() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property subCategory in model AppSeenInfo")); + } + if (risk() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property risk in model AppSeenInfo")); + } + if (tag() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property tag in model AppSeenInfo")); + } + if (technology() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property technology in model AppSeenInfo")); + } + if (standardPorts() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property standardPorts in model AppSeenInfo")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AppSeenInfo.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ApplicationInsights.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ApplicationInsights.java new file mode 100644 index 000000000000..0a07e7e5d78b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ApplicationInsights.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Application Insights key. */ +@Fluent +public final class ApplicationInsights { + /* + * Resource id for Application Insights + */ + @JsonProperty(value = "id") + private String id; + + /* + * Application Insights key + */ + @JsonProperty(value = "key") + private String key; + + /** Creates an instance of ApplicationInsights class. */ + public ApplicationInsights() { + } + + /** + * Get the id property: Resource id for Application Insights. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource id for Application Insights. + * + * @param id the id value to set. + * @return the ApplicationInsights object itself. + */ + public ApplicationInsights withId(String id) { + this.id = id; + return this; + } + + /** + * Get the key property: Application Insights key. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: Application Insights key. + * + * @param key the key value to set. + * @return the ApplicationInsights object itself. + */ + public ApplicationInsights withKey(String key) { + this.key = key; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AzureResourceManagerManagedIdentityProperties.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AzureResourceManagerManagedIdentityProperties.java new file mode 100644 index 000000000000..95846f78f5da --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AzureResourceManagerManagedIdentityProperties.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The properties of the managed service identities assigned to this resource. */ +@Fluent +public final class AzureResourceManagerManagedIdentityProperties { + /* + * The Active Directory tenant id of the principal. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /* + * The active directory identifier of this principal. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * The type of managed identity assigned to this resource. + */ + @JsonProperty(value = "type", required = true) + private ManagedIdentityType type; + + /* + * The identities assigned to this resource by the user. + */ + @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map userAssignedIdentities; + + /** Creates an instance of AzureResourceManagerManagedIdentityProperties class. */ + public AzureResourceManagerManagedIdentityProperties() { + } + + /** + * Get the tenantId property: The Active Directory tenant id of the principal. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the principalId property: The active directory identifier of this principal. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the type property: The type of managed identity assigned to this resource. + * + * @return the type value. + */ + public ManagedIdentityType 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 AzureResourceManagerManagedIdentityProperties object itself. + */ + public AzureResourceManagerManagedIdentityProperties withType(ManagedIdentityType 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 AzureResourceManagerManagedIdentityProperties object itself. + */ + public AzureResourceManagerManagedIdentityProperties withUserAssignedIdentities( + Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (type() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property type in model AzureResourceManagerManagedIdentityProperties")); + } + if (userAssignedIdentities() != null) { + userAssignedIdentities() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AzureResourceManagerManagedIdentityProperties.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AzureResourceManagerUserAssignedIdentity.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AzureResourceManagerUserAssignedIdentity.java new file mode 100644 index 000000000000..f5017efdab35 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/AzureResourceManagerUserAssignedIdentity.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A managed identity assigned by the user. */ +@Fluent +public final class AzureResourceManagerUserAssignedIdentity { + /* + * The active directory client identifier for this principal. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The active directory identifier for this principal. + */ + @JsonProperty(value = "principalId") + private String principalId; + + /** Creates an instance of AzureResourceManagerUserAssignedIdentity class. */ + public AzureResourceManagerUserAssignedIdentity() { + } + + /** + * Get the clientId property: The active directory client identifier for this principal. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The active directory client identifier for this principal. + * + * @param clientId the clientId value to set. + * @return the AzureResourceManagerUserAssignedIdentity object itself. + */ + public AzureResourceManagerUserAssignedIdentity withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the principalId property: The active directory identifier for this principal. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Set the principalId property: The active directory identifier for this principal. + * + * @param principalId the principalId value to set. + * @return the AzureResourceManagerUserAssignedIdentity object itself. + */ + public AzureResourceManagerUserAssignedIdentity withPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/BillingCycle.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/BillingCycle.java new file mode 100644 index 000000000000..41d5e11c6482 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/BillingCycle.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Billing cycle. */ +public final class BillingCycle extends ExpandableStringEnum { + /** Static value WEEKLY for BillingCycle. */ + public static final BillingCycle WEEKLY = fromString("WEEKLY"); + + /** Static value MONTHLY for BillingCycle. */ + public static final BillingCycle MONTHLY = fromString("MONTHLY"); + + /** + * Creates a new instance of BillingCycle value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BillingCycle() { + } + + /** + * Creates or finds a BillingCycle from its string representation. + * + * @param name a name to look for. + * @return the corresponding BillingCycle. + */ + @JsonCreator + public static BillingCycle fromString(String name) { + return fromString(name, BillingCycle.class); + } + + /** + * Gets known BillingCycle values. + * + * @return known BillingCycle values. + */ + public static Collection values() { + return values(BillingCycle.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/BooleanEnum.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/BooleanEnum.java new file mode 100644 index 000000000000..d96e6c74eb8e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/BooleanEnum.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Boolean Enum. */ +public final class BooleanEnum extends ExpandableStringEnum { + /** Static value TRUE for BooleanEnum. */ + public static final BooleanEnum TRUE = fromString("TRUE"); + + /** Static value FALSE for BooleanEnum. */ + public static final BooleanEnum FALSE = fromString("FALSE"); + + /** + * Creates a new instance of BooleanEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BooleanEnum() { + } + + /** + * Creates or finds a BooleanEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding BooleanEnum. + */ + @JsonCreator + public static BooleanEnum fromString(String name) { + return fromString(name, BooleanEnum.class); + } + + /** + * Gets known BooleanEnum values. + * + * @return known BooleanEnum values. + */ + public static Collection values() { + return values(BooleanEnum.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Category.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Category.java new file mode 100644 index 000000000000..6bbdff2ad87e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Category.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** URL/EDL to match. */ +@Fluent +public final class Category { + /* + * custom URL + */ + @JsonProperty(value = "urlCustom", required = true) + private List urlCustom; + + /* + * feed list + */ + @JsonProperty(value = "feeds", required = true) + private List feeds; + + /** Creates an instance of Category class. */ + public Category() { + } + + /** + * Get the urlCustom property: custom URL. + * + * @return the urlCustom value. + */ + public List urlCustom() { + return this.urlCustom; + } + + /** + * Set the urlCustom property: custom URL. + * + * @param urlCustom the urlCustom value to set. + * @return the Category object itself. + */ + public Category withUrlCustom(List urlCustom) { + this.urlCustom = urlCustom; + return this; + } + + /** + * Get the feeds property: feed list. + * + * @return the feeds value. + */ + public List feeds() { + return this.feeds; + } + + /** + * Set the feeds property: feed list. + * + * @param feeds the feeds value to set. + * @return the Category object itself. + */ + public Category withFeeds(List feeds) { + this.feeds = feeds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (urlCustom() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property urlCustom in model Category")); + } + if (feeds() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property feeds in model Category")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Category.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectGlobalRulestackResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectGlobalRulestackResource.java new file mode 100644 index 000000000000..79d4d47a76fc --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectGlobalRulestackResource.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectGlobalRulestackResourceInner; + +/** An immutable client-side representation of CertificateObjectGlobalRulestackResource. */ +public interface CertificateObjectGlobalRulestackResource { + /** + * 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 certificateSignerResourceId property: Resource Id of certificate signer, to be populated only when + * certificateSelfSigned is false. + * + * @return the certificateSignerResourceId value. + */ + String certificateSignerResourceId(); + + /** + * Gets the certificateSelfSigned property: use certificate self signed. + * + * @return the certificateSelfSigned value. + */ + BooleanEnum certificateSelfSigned(); + + /** + * Gets the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + String auditComment(); + + /** + * Gets the description property: user description for this object. + * + * @return the description value. + */ + String description(); + + /** + * Gets the etag property: read only string representing last create or update. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the inner + * com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectGlobalRulestackResourceInner object. + * + * @return the inner object. + */ + CertificateObjectGlobalRulestackResourceInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectGlobalRulestackResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectGlobalRulestackResourceListResult.java new file mode 100644 index 000000000000..c1fbb196a7e9 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectGlobalRulestackResourceListResult.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectGlobalRulestackResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a CertificateObjectGlobalRulestackResource list operation. */ +@Fluent +public final class CertificateObjectGlobalRulestackResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of CertificateObjectGlobalRulestackResourceListResult class. */ + public CertificateObjectGlobalRulestackResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the CertificateObjectGlobalRulestackResourceListResult object itself. + */ + public CertificateObjectGlobalRulestackResourceListResult withValue( + List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the CertificateObjectGlobalRulestackResourceListResult object itself. + */ + public CertificateObjectGlobalRulestackResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model CertificateObjectGlobalRulestackResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = + new ClientLogger(CertificateObjectGlobalRulestackResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectGlobalRulestacks.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectGlobalRulestacks.java new file mode 100644 index 000000000000..49b9ffe5dd88 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectGlobalRulestacks.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectGlobalRulestackResourceInner; + +/** Resource collection API of CertificateObjectGlobalRulestacks. */ +public interface CertificateObjectGlobalRulestacks { + /** + * List CertificateObjectGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 CertificateObjectGlobalRulestackResource list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String globalRulestackName); + + /** + * List CertificateObjectGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 CertificateObjectGlobalRulestackResource list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String globalRulestackName, Context context); + + /** + * Get a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @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 CertificateObjectGlobalRulestackResource along with {@link Response}. + */ + Response getWithResponse( + String globalRulestackName, String name, Context context); + + /** + * Get a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 CertificateObjectGlobalRulestackResource. + */ + CertificateObjectGlobalRulestackResource get(String globalRulestackName, String name); + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object. + */ + CertificateObjectGlobalRulestackResource createOrUpdate( + String globalRulestackName, String name, CertificateObjectGlobalRulestackResourceInner resource); + + /** + * Create a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @param resource 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 globalRulestack Certificate Object. + */ + CertificateObjectGlobalRulestackResource createOrUpdate( + String globalRulestackName, + String name, + CertificateObjectGlobalRulestackResourceInner resource, + Context context); + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 globalRulestackName, String name); + + /** + * Delete a CertificateObjectGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name certificate name. + * @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 globalRulestackName, String name, Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectLocalRulestackResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectLocalRulestackResource.java new file mode 100644 index 000000000000..313233b8b8aa --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectLocalRulestackResource.java @@ -0,0 +1,308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectLocalRulestackResourceInner; + +/** An immutable client-side representation of CertificateObjectLocalRulestackResource. */ +public interface CertificateObjectLocalRulestackResource { + /** + * 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 certificateSignerResourceId property: Resource Id of certificate signer, to be populated only when + * certificateSelfSigned is false. + * + * @return the certificateSignerResourceId value. + */ + String certificateSignerResourceId(); + + /** + * Gets the certificateSelfSigned property: use certificate self signed. + * + * @return the certificateSelfSigned value. + */ + BooleanEnum certificateSelfSigned(); + + /** + * Gets the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + String auditComment(); + + /** + * Gets the description property: user description for this object. + * + * @return the description value. + */ + String description(); + + /** + * Gets the etag property: read only string representing last create or update. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectLocalRulestackResourceInner object. + * + * @return the inner object. + */ + CertificateObjectLocalRulestackResourceInner innerModel(); + + /** The entirety of the CertificateObjectLocalRulestackResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithCertificateSelfSigned, + DefinitionStages.WithCreate { + } + /** The CertificateObjectLocalRulestackResource definition stages. */ + interface DefinitionStages { + /** The first stage of the CertificateObjectLocalRulestackResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the CertificateObjectLocalRulestackResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, localRulestackName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @return the next definition stage. + */ + WithCertificateSelfSigned withExistingLocalRulestack(String resourceGroupName, String localRulestackName); + } + /** + * The stage of the CertificateObjectLocalRulestackResource definition allowing to specify + * certificateSelfSigned. + */ + interface WithCertificateSelfSigned { + /** + * Specifies the certificateSelfSigned property: use certificate self signed. + * + * @param certificateSelfSigned use certificate self signed. + * @return the next definition stage. + */ + WithCreate withCertificateSelfSigned(BooleanEnum certificateSelfSigned); + } + /** + * The stage of the CertificateObjectLocalRulestackResource 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.WithCertificateSignerResourceId, + DefinitionStages.WithAuditComment, + DefinitionStages.WithDescription, + DefinitionStages.WithEtag { + /** + * Executes the create request. + * + * @return the created resource. + */ + CertificateObjectLocalRulestackResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + CertificateObjectLocalRulestackResource create(Context context); + } + /** + * The stage of the CertificateObjectLocalRulestackResource definition allowing to specify + * certificateSignerResourceId. + */ + interface WithCertificateSignerResourceId { + /** + * Specifies the certificateSignerResourceId property: Resource Id of certificate signer, to be populated + * only when certificateSelfSigned is false. + * + * @param certificateSignerResourceId Resource Id of certificate signer, to be populated only when + * certificateSelfSigned is false. + * @return the next definition stage. + */ + WithCreate withCertificateSignerResourceId(String certificateSignerResourceId); + } + /** The stage of the CertificateObjectLocalRulestackResource definition allowing to specify auditComment. */ + interface WithAuditComment { + /** + * Specifies the auditComment property: comment for this object. + * + * @param auditComment comment for this object. + * @return the next definition stage. + */ + WithCreate withAuditComment(String auditComment); + } + /** The stage of the CertificateObjectLocalRulestackResource definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: user description for this object. + * + * @param description user description for this object. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the CertificateObjectLocalRulestackResource definition allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: read only string representing last create or update. + * + * @param etag read only string representing last create or update. + * @return the next definition stage. + */ + WithCreate withEtag(String etag); + } + } + /** + * Begins update for the CertificateObjectLocalRulestackResource resource. + * + * @return the stage of resource update. + */ + CertificateObjectLocalRulestackResource.Update update(); + + /** The template for CertificateObjectLocalRulestackResource update. */ + interface Update + extends UpdateStages.WithCertificateSignerResourceId, + UpdateStages.WithCertificateSelfSigned, + UpdateStages.WithAuditComment, + UpdateStages.WithDescription, + UpdateStages.WithEtag { + /** + * Executes the update request. + * + * @return the updated resource. + */ + CertificateObjectLocalRulestackResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + CertificateObjectLocalRulestackResource apply(Context context); + } + /** The CertificateObjectLocalRulestackResource update stages. */ + interface UpdateStages { + /** + * The stage of the CertificateObjectLocalRulestackResource update allowing to specify + * certificateSignerResourceId. + */ + interface WithCertificateSignerResourceId { + /** + * Specifies the certificateSignerResourceId property: Resource Id of certificate signer, to be populated + * only when certificateSelfSigned is false. + * + * @param certificateSignerResourceId Resource Id of certificate signer, to be populated only when + * certificateSelfSigned is false. + * @return the next definition stage. + */ + Update withCertificateSignerResourceId(String certificateSignerResourceId); + } + /** + * The stage of the CertificateObjectLocalRulestackResource update allowing to specify certificateSelfSigned. + */ + interface WithCertificateSelfSigned { + /** + * Specifies the certificateSelfSigned property: use certificate self signed. + * + * @param certificateSelfSigned use certificate self signed. + * @return the next definition stage. + */ + Update withCertificateSelfSigned(BooleanEnum certificateSelfSigned); + } + /** The stage of the CertificateObjectLocalRulestackResource update allowing to specify auditComment. */ + interface WithAuditComment { + /** + * Specifies the auditComment property: comment for this object. + * + * @param auditComment comment for this object. + * @return the next definition stage. + */ + Update withAuditComment(String auditComment); + } + /** The stage of the CertificateObjectLocalRulestackResource update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: user description for this object. + * + * @param description user description for this object. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the CertificateObjectLocalRulestackResource update allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: read only string representing last create or update. + * + * @param etag read only string representing last create or update. + * @return the next definition stage. + */ + Update withEtag(String etag); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + CertificateObjectLocalRulestackResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + CertificateObjectLocalRulestackResource refresh(Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectLocalRulestackResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectLocalRulestackResourceListResult.java new file mode 100644 index 000000000000..81768ba4cf2f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectLocalRulestackResourceListResult.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectLocalRulestackResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a CertificateObjectLocalRulestackResource list operation. */ +@Fluent +public final class CertificateObjectLocalRulestackResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of CertificateObjectLocalRulestackResourceListResult class. */ + public CertificateObjectLocalRulestackResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the CertificateObjectLocalRulestackResourceListResult object itself. + */ + public CertificateObjectLocalRulestackResourceListResult withValue( + List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the CertificateObjectLocalRulestackResourceListResult object itself. + */ + public CertificateObjectLocalRulestackResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model CertificateObjectLocalRulestackResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = + new ClientLogger(CertificateObjectLocalRulestackResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectLocalRulestacks.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectLocalRulestacks.java new file mode 100644 index 000000000000..b580c64f4ffb --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CertificateObjectLocalRulestacks.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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 CertificateObjectLocalRulestacks. */ +public interface CertificateObjectLocalRulestacks { + /** + * List CertificateObjectLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 CertificateObjectLocalRulestackResource list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName); + + /** + * List CertificateObjectLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 CertificateObjectLocalRulestackResource list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context); + + /** + * Get a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @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 CertificateObjectLocalRulestackResource along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String localRulestackName, String name, Context context); + + /** + * Get a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 CertificateObjectLocalRulestackResource. + */ + CertificateObjectLocalRulestackResource get(String resourceGroupName, String localRulestackName, String name); + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 localRulestackName, String name); + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name certificate name. + * @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 localRulestackName, String name, Context context); + + /** + * Get a CertificateObjectLocalRulestackResource. + * + * @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 CertificateObjectLocalRulestackResource along with {@link Response}. + */ + CertificateObjectLocalRulestackResource getById(String id); + + /** + * Get a CertificateObjectLocalRulestackResource. + * + * @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 CertificateObjectLocalRulestackResource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a CertificateObjectLocalRulestackResource. + * + * @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 a CertificateObjectLocalRulestackResource. + * + * @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 CertificateObjectLocalRulestackResource resource. + * + * @param name resource name. + * @return the first stage of the new CertificateObjectLocalRulestackResource definition. + */ + CertificateObjectLocalRulestackResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Changelog.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Changelog.java new file mode 100644 index 000000000000..8a9c00bc9eca --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Changelog.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ChangelogInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** An immutable client-side representation of Changelog. */ +public interface Changelog { + /** + * Gets the changes property: list of changes. + * + * @return the changes value. + */ + List changes(); + + /** + * Gets the lastCommitted property: lastCommitted timestamp. + * + * @return the lastCommitted value. + */ + OffsetDateTime lastCommitted(); + + /** + * Gets the lastModified property: lastModified timestamp. + * + * @return the lastModified value. + */ + OffsetDateTime lastModified(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.ChangelogInner object. + * + * @return the inner object. + */ + ChangelogInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CountriesResponse.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CountriesResponse.java new file mode 100644 index 000000000000..ea9719c25893 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/CountriesResponse.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CountriesResponseInner; +import java.util.List; + +/** An immutable client-side representation of CountriesResponse. */ +public interface CountriesResponse { + /** + * Gets the value property: List of countries. + * + * @return the value value. + */ + List value(); + + /** + * Gets the nextLink property: next link. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.CountriesResponseInner object. + * + * @return the inner object. + */ + CountriesResponseInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Country.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Country.java new file mode 100644 index 000000000000..ae042c1f60e6 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Country.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Country Description. */ +@Fluent +public final class Country { + /* + * country code + */ + @JsonProperty(value = "code", required = true) + private String code; + + /* + * code description + */ + @JsonProperty(value = "description") + private String description; + + /** Creates an instance of Country class. */ + public Country() { + } + + /** + * Get the code property: country code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: country code. + * + * @param code the code value to set. + * @return the Country object itself. + */ + public Country withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the description property: code description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: code description. + * + * @param description the description value to set. + * @return the Country object itself. + */ + public Country withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (code() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property code in model Country")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Country.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DecryptionRuleTypeEnum.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DecryptionRuleTypeEnum.java new file mode 100644 index 000000000000..5c32e028d3cd --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DecryptionRuleTypeEnum.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DecryptionRuleTypeEnum. */ +public final class DecryptionRuleTypeEnum extends ExpandableStringEnum { + /** Static value SSLOutboundInspection for DecryptionRuleTypeEnum. */ + public static final DecryptionRuleTypeEnum SSLOUTBOUND_INSPECTION = fromString("SSLOutboundInspection"); + + /** Static value SSLInboundInspection for DecryptionRuleTypeEnum. */ + public static final DecryptionRuleTypeEnum SSLINBOUND_INSPECTION = fromString("SSLInboundInspection"); + + /** Static value None for DecryptionRuleTypeEnum. */ + public static final DecryptionRuleTypeEnum NONE = fromString("None"); + + /** + * Creates a new instance of DecryptionRuleTypeEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DecryptionRuleTypeEnum() { + } + + /** + * Creates or finds a DecryptionRuleTypeEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding DecryptionRuleTypeEnum. + */ + @JsonCreator + public static DecryptionRuleTypeEnum fromString(String name) { + return fromString(name, DecryptionRuleTypeEnum.class); + } + + /** + * Gets known DecryptionRuleTypeEnum values. + * + * @return known DecryptionRuleTypeEnum values. + */ + public static Collection values() { + return values(DecryptionRuleTypeEnum.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DefaultMode.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DefaultMode.java new file mode 100644 index 000000000000..6d22cda0745b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DefaultMode.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type for Default Mode for rules creation. */ +public final class DefaultMode extends ExpandableStringEnum { + /** Static value IPS for DefaultMode. */ + public static final DefaultMode IPS = fromString("IPS"); + + /** Static value FIREWALL for DefaultMode. */ + public static final DefaultMode FIREWALL = fromString("FIREWALL"); + + /** Static value NONE for DefaultMode. */ + public static final DefaultMode NONE = fromString("NONE"); + + /** + * Creates a new instance of DefaultMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DefaultMode() { + } + + /** + * Creates or finds a DefaultMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding DefaultMode. + */ + @JsonCreator + public static DefaultMode fromString(String name) { + return fromString(name, DefaultMode.class); + } + + /** + * Gets known DefaultMode values. + * + * @return known DefaultMode values. + */ + public static Collection values() { + return values(DefaultMode.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DestinationAddr.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DestinationAddr.java new file mode 100644 index 000000000000..7c9b7eb06bc9 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DestinationAddr.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** destination address. */ +@Fluent +public final class DestinationAddr { + /* + * special value 'any' + */ + @JsonProperty(value = "cidrs") + private List cidrs; + + /* + * list of countries + */ + @JsonProperty(value = "countries") + private List countries; + + /* + * list of feeds + */ + @JsonProperty(value = "feeds") + private List feeds; + + /* + * prefix list + */ + @JsonProperty(value = "prefixLists") + private List prefixLists; + + /* + * fqdn list + */ + @JsonProperty(value = "fqdnLists") + private List fqdnLists; + + /** Creates an instance of DestinationAddr class. */ + public DestinationAddr() { + } + + /** + * Get the cidrs property: special value 'any'. + * + * @return the cidrs value. + */ + public List cidrs() { + return this.cidrs; + } + + /** + * Set the cidrs property: special value 'any'. + * + * @param cidrs the cidrs value to set. + * @return the DestinationAddr object itself. + */ + public DestinationAddr withCidrs(List cidrs) { + this.cidrs = cidrs; + return this; + } + + /** + * Get the countries property: list of countries. + * + * @return the countries value. + */ + public List countries() { + return this.countries; + } + + /** + * Set the countries property: list of countries. + * + * @param countries the countries value to set. + * @return the DestinationAddr object itself. + */ + public DestinationAddr withCountries(List countries) { + this.countries = countries; + return this; + } + + /** + * Get the feeds property: list of feeds. + * + * @return the feeds value. + */ + public List feeds() { + return this.feeds; + } + + /** + * Set the feeds property: list of feeds. + * + * @param feeds the feeds value to set. + * @return the DestinationAddr object itself. + */ + public DestinationAddr withFeeds(List feeds) { + this.feeds = feeds; + return this; + } + + /** + * Get the prefixLists property: prefix list. + * + * @return the prefixLists value. + */ + public List prefixLists() { + return this.prefixLists; + } + + /** + * Set the prefixLists property: prefix list. + * + * @param prefixLists the prefixLists value to set. + * @return the DestinationAddr object itself. + */ + public DestinationAddr withPrefixLists(List prefixLists) { + this.prefixLists = prefixLists; + return this; + } + + /** + * Get the fqdnLists property: fqdn list. + * + * @return the fqdnLists value. + */ + public List fqdnLists() { + return this.fqdnLists; + } + + /** + * Set the fqdnLists property: fqdn list. + * + * @param fqdnLists the fqdnLists value to set. + * @return the DestinationAddr object itself. + */ + public DestinationAddr withFqdnLists(List fqdnLists) { + this.fqdnLists = fqdnLists; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DnsProxy.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DnsProxy.java new file mode 100644 index 000000000000..722fa3e7cd1b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DnsProxy.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** DNS Proxy. */ +public final class DnsProxy extends ExpandableStringEnum { + /** Static value DISABLED for DnsProxy. */ + public static final DnsProxy DISABLED = fromString("DISABLED"); + + /** Static value ENABLED for DnsProxy. */ + public static final DnsProxy ENABLED = fromString("ENABLED"); + + /** + * Creates a new instance of DnsProxy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DnsProxy() { + } + + /** + * Creates or finds a DnsProxy from its string representation. + * + * @param name a name to look for. + * @return the corresponding DnsProxy. + */ + @JsonCreator + public static DnsProxy fromString(String name) { + return fromString(name, DnsProxy.class); + } + + /** + * Gets known DnsProxy values. + * + * @return known DnsProxy values. + */ + public static Collection values() { + return values(DnsProxy.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DnsSettings.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DnsSettings.java new file mode 100644 index 000000000000..0e8c4ccf37be --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/DnsSettings.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** DNS Proxy settings for Firewall. */ +@Fluent +public final class DnsSettings { + /* + * Enable DNS proxy, disabled by default + */ + @JsonProperty(value = "enableDnsProxy") + private DnsProxy enableDnsProxy; + + /* + * Enabled DNS proxy type, disabled by default + */ + @JsonProperty(value = "enabledDnsType") + private EnabledDnsType enabledDnsType; + + /* + * List of IPs associated with the Firewall + */ + @JsonProperty(value = "dnsServers") + private List dnsServers; + + /** Creates an instance of DnsSettings class. */ + public DnsSettings() { + } + + /** + * Get the enableDnsProxy property: Enable DNS proxy, disabled by default. + * + * @return the enableDnsProxy value. + */ + public DnsProxy enableDnsProxy() { + return this.enableDnsProxy; + } + + /** + * Set the enableDnsProxy property: Enable DNS proxy, disabled by default. + * + * @param enableDnsProxy the enableDnsProxy value to set. + * @return the DnsSettings object itself. + */ + public DnsSettings withEnableDnsProxy(DnsProxy enableDnsProxy) { + this.enableDnsProxy = enableDnsProxy; + return this; + } + + /** + * Get the enabledDnsType property: Enabled DNS proxy type, disabled by default. + * + * @return the enabledDnsType value. + */ + public EnabledDnsType enabledDnsType() { + return this.enabledDnsType; + } + + /** + * Set the enabledDnsType property: Enabled DNS proxy type, disabled by default. + * + * @param enabledDnsType the enabledDnsType value to set. + * @return the DnsSettings object itself. + */ + public DnsSettings withEnabledDnsType(EnabledDnsType enabledDnsType) { + this.enabledDnsType = enabledDnsType; + return this; + } + + /** + * Get the dnsServers property: List of IPs associated with the Firewall. + * + * @return the dnsServers value. + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Set the dnsServers property: List of IPs associated with the Firewall. + * + * @param dnsServers the dnsServers value to set. + * @return the DnsSettings object itself. + */ + public DnsSettings withDnsServers(List dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dnsServers() != null) { + dnsServers().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EgressNat.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EgressNat.java new file mode 100644 index 000000000000..680a74531ff3 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EgressNat.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Egress NAT. */ +public final class EgressNat extends ExpandableStringEnum { + /** Static value DISABLED for EgressNat. */ + public static final EgressNat DISABLED = fromString("DISABLED"); + + /** Static value ENABLED for EgressNat. */ + public static final EgressNat ENABLED = fromString("ENABLED"); + + /** + * Creates a new instance of EgressNat value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EgressNat() { + } + + /** + * Creates or finds a EgressNat from its string representation. + * + * @param name a name to look for. + * @return the corresponding EgressNat. + */ + @JsonCreator + public static EgressNat fromString(String name) { + return fromString(name, EgressNat.class); + } + + /** + * Gets known EgressNat values. + * + * @return known EgressNat values. + */ + public static Collection values() { + return values(EgressNat.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EnabledDnsType.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EnabledDnsType.java new file mode 100644 index 000000000000..c512a84c8a4a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EnabledDnsType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Enabled DNS type values. */ +public final class EnabledDnsType extends ExpandableStringEnum { + /** Static value CUSTOM for EnabledDnsType. */ + public static final EnabledDnsType CUSTOM = fromString("CUSTOM"); + + /** Static value AZURE for EnabledDnsType. */ + public static final EnabledDnsType AZURE = fromString("AZURE"); + + /** + * Creates a new instance of EnabledDnsType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EnabledDnsType() { + } + + /** + * Creates or finds a EnabledDnsType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EnabledDnsType. + */ + @JsonCreator + public static EnabledDnsType fromString(String name) { + return fromString(name, EnabledDnsType.class); + } + + /** + * Gets known EnabledDnsType values. + * + * @return known EnabledDnsType values. + */ + public static Collection values() { + return values(EnabledDnsType.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EndpointConfiguration.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EndpointConfiguration.java new file mode 100644 index 000000000000..af67c1fb9c30 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EndpointConfiguration.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Endpoint Configuration for frontend and backend. */ +@Fluent +public final class EndpointConfiguration { + /* + * port ID + */ + @JsonProperty(value = "port", required = true) + private String port; + + /* + * Address Space + */ + @JsonProperty(value = "address", required = true) + private IpAddress address; + + /** Creates an instance of EndpointConfiguration class. */ + public EndpointConfiguration() { + } + + /** + * Get the port property: port ID. + * + * @return the port value. + */ + public String port() { + return this.port; + } + + /** + * Set the port property: port ID. + * + * @param port the port value to set. + * @return the EndpointConfiguration object itself. + */ + public EndpointConfiguration withPort(String port) { + this.port = port; + return this; + } + + /** + * Get the address property: Address Space. + * + * @return the address value. + */ + public IpAddress address() { + return this.address; + } + + /** + * Set the address property: Address Space. + * + * @param address the address value to set. + * @return the EndpointConfiguration object itself. + */ + public EndpointConfiguration withAddress(IpAddress address) { + this.address = address; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (port() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property port in model EndpointConfiguration")); + } + if (address() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property address in model EndpointConfiguration")); + } else { + address().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EndpointConfiguration.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EventHub.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EventHub.java new file mode 100644 index 000000000000..ee1dfa58198e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/EventHub.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** EventHub configurations. */ +@Fluent +public final class EventHub { + /* + * Resource ID of EventHub + */ + @JsonProperty(value = "id") + private String id; + + /* + * Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * EventHub name + */ + @JsonProperty(value = "name") + private String name; + + /* + * EventHub namespace + */ + @JsonProperty(value = "nameSpace") + private String nameSpace; + + /* + * EventHub policy name + */ + @JsonProperty(value = "policyName") + private String policyName; + + /** Creates an instance of EventHub class. */ + public EventHub() { + } + + /** + * Get the id property: Resource ID of EventHub. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID of EventHub. + * + * @param id the id value to set. + * @return the EventHub object itself. + */ + public EventHub withId(String id) { + this.id = id; + return this; + } + + /** + * Get the subscriptionId property: Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the EventHub object itself. + */ + public EventHub withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the name property: EventHub name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: EventHub name. + * + * @param name the name value to set. + * @return the EventHub object itself. + */ + public EventHub withName(String name) { + this.name = name; + return this; + } + + /** + * Get the nameSpace property: EventHub namespace. + * + * @return the nameSpace value. + */ + public String nameSpace() { + return this.nameSpace; + } + + /** + * Set the nameSpace property: EventHub namespace. + * + * @param nameSpace the nameSpace value to set. + * @return the EventHub object itself. + */ + public EventHub withNameSpace(String nameSpace) { + this.nameSpace = nameSpace; + return this; + } + + /** + * Get the policyName property: EventHub policy name. + * + * @return the policyName value. + */ + public String policyName() { + return this.policyName; + } + + /** + * Set the policyName property: EventHub policy name. + * + * @param policyName the policyName value to set. + * @return the EventHub object itself. + */ + public EventHub withPolicyName(String policyName) { + this.policyName = policyName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResource.java new file mode 100644 index 000000000000..daafb7e0ee98 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResource.java @@ -0,0 +1,500 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FirewallResourceInner; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LogSettingsInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of FirewallResource. */ +public interface FirewallResource { + /** + * 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. + */ + AzureResourceManagerManagedIdentityProperties identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the panEtag property: panEtag info. + * + * @return the panEtag value. + */ + String panEtag(); + + /** + * Gets the networkProfile property: Network settings. + * + * @return the networkProfile value. + */ + NetworkProfile networkProfile(); + + /** + * Gets the isPanoramaManaged property: Panorama Managed: Default is False. Default will be CloudSec managed. + * + * @return the isPanoramaManaged value. + */ + BooleanEnum isPanoramaManaged(); + + /** + * Gets the panoramaConfig property: Panorama Configuration. + * + * @return the panoramaConfig value. + */ + PanoramaConfig panoramaConfig(); + + /** + * Gets the associatedRulestack property: Associated Rulestack. + * + * @return the associatedRulestack value. + */ + RulestackDetails associatedRulestack(); + + /** + * Gets the dnsSettings property: DNS settings for Firewall. + * + * @return the dnsSettings value. + */ + DnsSettings dnsSettings(); + + /** + * Gets the frontEndSettings property: Frontend settings for Firewall. + * + * @return the frontEndSettings value. + */ + List frontEndSettings(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the planData property: Billing plan information. + * + * @return the planData value. + */ + PlanData planData(); + + /** + * Gets the marketplaceDetails property: Marketplace details. + * + * @return the marketplaceDetails value. + */ + MarketplaceDetails marketplaceDetails(); + + /** + * 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.paloaltonetworks.fluent.models.FirewallResourceInner object. + * + * @return the inner object. + */ + FirewallResourceInner innerModel(); + + /** The entirety of the FirewallResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithNetworkProfile, + DefinitionStages.WithDnsSettings, + DefinitionStages.WithPlanData, + DefinitionStages.WithMarketplaceDetails, + DefinitionStages.WithCreate { + } + /** The FirewallResource definition stages. */ + interface DefinitionStages { + /** The first stage of the FirewallResource definition. */ + interface Blank extends WithLocation { + } + /** The stage of the FirewallResource 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 FirewallResource 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. + */ + WithNetworkProfile withExistingResourceGroup(String resourceGroupName); + } + /** The stage of the FirewallResource definition allowing to specify networkProfile. */ + interface WithNetworkProfile { + /** + * Specifies the networkProfile property: Network settings. + * + * @param networkProfile Network settings. + * @return the next definition stage. + */ + WithDnsSettings withNetworkProfile(NetworkProfile networkProfile); + } + /** The stage of the FirewallResource definition allowing to specify dnsSettings. */ + interface WithDnsSettings { + /** + * Specifies the dnsSettings property: DNS settings for Firewall. + * + * @param dnsSettings DNS settings for Firewall. + * @return the next definition stage. + */ + WithPlanData withDnsSettings(DnsSettings dnsSettings); + } + /** The stage of the FirewallResource definition allowing to specify planData. */ + interface WithPlanData { + /** + * Specifies the planData property: Billing plan information.. + * + * @param planData Billing plan information. + * @return the next definition stage. + */ + WithMarketplaceDetails withPlanData(PlanData planData); + } + /** The stage of the FirewallResource definition allowing to specify marketplaceDetails. */ + interface WithMarketplaceDetails { + /** + * Specifies the marketplaceDetails property: Marketplace details. + * + * @param marketplaceDetails Marketplace details. + * @return the next definition stage. + */ + WithCreate withMarketplaceDetails(MarketplaceDetails marketplaceDetails); + } + /** + * The stage of the FirewallResource 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.WithPanEtag, + DefinitionStages.WithIsPanoramaManaged, + DefinitionStages.WithPanoramaConfig, + DefinitionStages.WithAssociatedRulestack, + DefinitionStages.WithFrontEndSettings { + /** + * Executes the create request. + * + * @return the created resource. + */ + FirewallResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + FirewallResource create(Context context); + } + /** The stage of the FirewallResource 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 FirewallResource 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(AzureResourceManagerManagedIdentityProperties identity); + } + /** The stage of the FirewallResource definition allowing to specify panEtag. */ + interface WithPanEtag { + /** + * Specifies the panEtag property: panEtag info. + * + * @param panEtag panEtag info. + * @return the next definition stage. + */ + WithCreate withPanEtag(String panEtag); + } + /** The stage of the FirewallResource definition allowing to specify isPanoramaManaged. */ + interface WithIsPanoramaManaged { + /** + * Specifies the isPanoramaManaged property: Panorama Managed: Default is False. Default will be CloudSec + * managed. + * + * @param isPanoramaManaged Panorama Managed: Default is False. Default will be CloudSec managed. + * @return the next definition stage. + */ + WithCreate withIsPanoramaManaged(BooleanEnum isPanoramaManaged); + } + /** The stage of the FirewallResource definition allowing to specify panoramaConfig. */ + interface WithPanoramaConfig { + /** + * Specifies the panoramaConfig property: Panorama Configuration. + * + * @param panoramaConfig Panorama Configuration. + * @return the next definition stage. + */ + WithCreate withPanoramaConfig(PanoramaConfig panoramaConfig); + } + /** The stage of the FirewallResource definition allowing to specify associatedRulestack. */ + interface WithAssociatedRulestack { + /** + * Specifies the associatedRulestack property: Associated Rulestack. + * + * @param associatedRulestack Associated Rulestack. + * @return the next definition stage. + */ + WithCreate withAssociatedRulestack(RulestackDetails associatedRulestack); + } + /** The stage of the FirewallResource definition allowing to specify frontEndSettings. */ + interface WithFrontEndSettings { + /** + * Specifies the frontEndSettings property: Frontend settings for Firewall. + * + * @param frontEndSettings Frontend settings for Firewall. + * @return the next definition stage. + */ + WithCreate withFrontEndSettings(List frontEndSettings); + } + } + /** + * Begins update for the FirewallResource resource. + * + * @return the stage of resource update. + */ + FirewallResource.Update update(); + + /** The template for FirewallResource update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + FirewallResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + FirewallResource apply(Context context); + } + /** The FirewallResource update stages. */ + interface UpdateStages { + /** The stage of the FirewallResource 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 FirewallResource 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(AzureResourceManagerManagedIdentityProperties identity); + } + /** The stage of the FirewallResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: The updatable properties of the FirewallResource.. + * + * @param properties The updatable properties of the FirewallResource. + * @return the next definition stage. + */ + Update withProperties(FirewallResourceUpdateProperties properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + FirewallResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + FirewallResource refresh(Context context); + + /** + * Get Global Rulestack associated with the Firewall. + * + * @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 global Rulestack associated with the Firewall along with {@link Response}. + */ + Response getGlobalRulestackWithResponse(Context context); + + /** + * Get Global Rulestack associated with the Firewall. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return global Rulestack associated with the Firewall. + */ + GlobalRulestackInfo getGlobalRulestack(); + + /** + * Log Profile for Firewall. + * + * @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 log Settings for Firewall along with {@link Response}. + */ + Response getLogProfileWithResponse(Context context); + + /** + * Log Profile for Firewall. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return log Settings for Firewall. + */ + LogSettings getLogProfile(); + + /** + * support info for firewall. + * + * @param email email address on behalf of which this API called. + * @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 support information for the resource along with {@link Response}. + */ + Response getSupportInfoWithResponse(String email, Context context); + + /** + * support info for firewall. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource. + */ + SupportInfo getSupportInfo(); + + /** + * Log Profile for Firewall. + * + * @param logSettings Log Settings for Firewall. + * @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 Response}. + */ + Response saveLogProfileWithResponse(LogSettingsInner logSettings, Context context); + + /** + * Log Profile for Firewall. + * + * @throws com.azure.core.management.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 saveLogProfile(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResourceListResult.java new file mode 100644 index 000000000000..3a15f7cb3d51 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FirewallResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a FirewallResource list operation. */ +@Fluent +public final class FirewallResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of FirewallResourceListResult class. */ + public FirewallResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the FirewallResourceListResult object itself. + */ + public FirewallResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the FirewallResourceListResult object itself. + */ + public FirewallResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model FirewallResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FirewallResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResourceUpdate.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResourceUpdate.java new file mode 100644 index 000000000000..eb53d4e70c76 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResourceUpdate.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The type used for update operations of the FirewallResource. */ +@Fluent +public final class FirewallResourceUpdate { + /* + * The managed service identities assigned to this resource. + */ + @JsonProperty(value = "identity") + private AzureResourceManagerManagedIdentityProperties identity; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The updatable properties of the FirewallResource. + */ + @JsonProperty(value = "properties") + private FirewallResourceUpdateProperties properties; + + /** Creates an instance of FirewallResourceUpdate class. */ + public FirewallResourceUpdate() { + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public AzureResourceManagerManagedIdentityProperties 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 FirewallResourceUpdate object itself. + */ + public FirewallResourceUpdate withIdentity(AzureResourceManagerManagedIdentityProperties identity) { + this.identity = identity; + return this; + } + + /** + * 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 FirewallResourceUpdate object itself. + */ + public FirewallResourceUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The updatable properties of the FirewallResource. + * + * @return the properties value. + */ + public FirewallResourceUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The updatable properties of the FirewallResource. + * + * @param properties the properties value to set. + * @return the FirewallResourceUpdate object itself. + */ + public FirewallResourceUpdate withProperties(FirewallResourceUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResourceUpdateProperties.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResourceUpdateProperties.java new file mode 100644 index 000000000000..666a39a5b234 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallResourceUpdateProperties.java @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The updatable properties of the FirewallResource. */ +@Fluent +public final class FirewallResourceUpdateProperties { + /* + * panEtag info + */ + @JsonProperty(value = "panEtag") + private String panEtag; + + /* + * Network settings + */ + @JsonProperty(value = "networkProfile") + private NetworkProfile networkProfile; + + /* + * Panorama Managed: Default is False. Default will be CloudSec managed + */ + @JsonProperty(value = "isPanoramaManaged") + private BooleanEnum isPanoramaManaged; + + /* + * Panorama Configuration + */ + @JsonProperty(value = "panoramaConfig") + private PanoramaConfig panoramaConfig; + + /* + * Associated Rulestack + */ + @JsonProperty(value = "associatedRulestack") + private RulestackDetails associatedRulestack; + + /* + * DNS settings for Firewall + */ + @JsonProperty(value = "dnsSettings") + private DnsSettings dnsSettings; + + /* + * Frontend settings for Firewall + */ + @JsonProperty(value = "frontEndSettings") + private List frontEndSettings; + + /* + * Billing plan information. + */ + @JsonProperty(value = "planData") + private PlanData planData; + + /* + * Marketplace details + */ + @JsonProperty(value = "marketplaceDetails") + private MarketplaceDetails marketplaceDetails; + + /** Creates an instance of FirewallResourceUpdateProperties class. */ + public FirewallResourceUpdateProperties() { + } + + /** + * Get the panEtag property: panEtag info. + * + * @return the panEtag value. + */ + public String panEtag() { + return this.panEtag; + } + + /** + * Set the panEtag property: panEtag info. + * + * @param panEtag the panEtag value to set. + * @return the FirewallResourceUpdateProperties object itself. + */ + public FirewallResourceUpdateProperties withPanEtag(String panEtag) { + this.panEtag = panEtag; + return this; + } + + /** + * Get the networkProfile property: Network settings. + * + * @return the networkProfile value. + */ + public NetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: Network settings. + * + * @param networkProfile the networkProfile value to set. + * @return the FirewallResourceUpdateProperties object itself. + */ + public FirewallResourceUpdateProperties withNetworkProfile(NetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get the isPanoramaManaged property: Panorama Managed: Default is False. Default will be CloudSec managed. + * + * @return the isPanoramaManaged value. + */ + public BooleanEnum isPanoramaManaged() { + return this.isPanoramaManaged; + } + + /** + * Set the isPanoramaManaged property: Panorama Managed: Default is False. Default will be CloudSec managed. + * + * @param isPanoramaManaged the isPanoramaManaged value to set. + * @return the FirewallResourceUpdateProperties object itself. + */ + public FirewallResourceUpdateProperties withIsPanoramaManaged(BooleanEnum isPanoramaManaged) { + this.isPanoramaManaged = isPanoramaManaged; + return this; + } + + /** + * Get the panoramaConfig property: Panorama Configuration. + * + * @return the panoramaConfig value. + */ + public PanoramaConfig panoramaConfig() { + return this.panoramaConfig; + } + + /** + * Set the panoramaConfig property: Panorama Configuration. + * + * @param panoramaConfig the panoramaConfig value to set. + * @return the FirewallResourceUpdateProperties object itself. + */ + public FirewallResourceUpdateProperties withPanoramaConfig(PanoramaConfig panoramaConfig) { + this.panoramaConfig = panoramaConfig; + return this; + } + + /** + * Get the associatedRulestack property: Associated Rulestack. + * + * @return the associatedRulestack value. + */ + public RulestackDetails associatedRulestack() { + return this.associatedRulestack; + } + + /** + * Set the associatedRulestack property: Associated Rulestack. + * + * @param associatedRulestack the associatedRulestack value to set. + * @return the FirewallResourceUpdateProperties object itself. + */ + public FirewallResourceUpdateProperties withAssociatedRulestack(RulestackDetails associatedRulestack) { + this.associatedRulestack = associatedRulestack; + return this; + } + + /** + * Get the dnsSettings property: DNS settings for Firewall. + * + * @return the dnsSettings value. + */ + public DnsSettings dnsSettings() { + return this.dnsSettings; + } + + /** + * Set the dnsSettings property: DNS settings for Firewall. + * + * @param dnsSettings the dnsSettings value to set. + * @return the FirewallResourceUpdateProperties object itself. + */ + public FirewallResourceUpdateProperties withDnsSettings(DnsSettings dnsSettings) { + this.dnsSettings = dnsSettings; + return this; + } + + /** + * Get the frontEndSettings property: Frontend settings for Firewall. + * + * @return the frontEndSettings value. + */ + public List frontEndSettings() { + return this.frontEndSettings; + } + + /** + * Set the frontEndSettings property: Frontend settings for Firewall. + * + * @param frontEndSettings the frontEndSettings value to set. + * @return the FirewallResourceUpdateProperties object itself. + */ + public FirewallResourceUpdateProperties withFrontEndSettings(List frontEndSettings) { + this.frontEndSettings = frontEndSettings; + return this; + } + + /** + * Get the planData property: Billing plan information. + * + * @return the planData value. + */ + public PlanData planData() { + return this.planData; + } + + /** + * Set the planData property: Billing plan information. + * + * @param planData the planData value to set. + * @return the FirewallResourceUpdateProperties object itself. + */ + public FirewallResourceUpdateProperties withPlanData(PlanData planData) { + this.planData = planData; + return this; + } + + /** + * Get the marketplaceDetails property: Marketplace details. + * + * @return the marketplaceDetails value. + */ + public MarketplaceDetails marketplaceDetails() { + return this.marketplaceDetails; + } + + /** + * Set the marketplaceDetails property: Marketplace details. + * + * @param marketplaceDetails the marketplaceDetails value to set. + * @return the FirewallResourceUpdateProperties object itself. + */ + public FirewallResourceUpdateProperties withMarketplaceDetails(MarketplaceDetails marketplaceDetails) { + this.marketplaceDetails = marketplaceDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkProfile() != null) { + networkProfile().validate(); + } + if (panoramaConfig() != null) { + panoramaConfig().validate(); + } + if (associatedRulestack() != null) { + associatedRulestack().validate(); + } + if (dnsSettings() != null) { + dnsSettings().validate(); + } + if (frontEndSettings() != null) { + frontEndSettings().forEach(e -> e.validate()); + } + if (planData() != null) { + planData().validate(); + } + if (marketplaceDetails() != null) { + marketplaceDetails().validate(); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallStatus.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallStatus.java new file mode 100644 index 000000000000..b5392fb5e476 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallStatus.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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 FirewallStatus. */ +public interface FirewallStatus { + /** + * List FirewallStatusResource resources by Firewalls. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 FirewallStatusResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirewalls(String resourceGroupName, String firewallName); + + /** + * List FirewallStatusResource resources by Firewalls. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 FirewallStatusResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirewalls( + String resourceGroupName, String firewallName, Context context); + + /** + * Get a FirewallStatusResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 FirewallStatusResource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String firewallName, Context context); + + /** + * Get a FirewallStatusResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 FirewallStatusResource. + */ + FirewallStatusResource get(String resourceGroupName, String firewallName); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallStatusResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallStatusResource.java new file mode 100644 index 000000000000..51550decaf02 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallStatusResource.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FirewallStatusResourceInner; + +/** An immutable client-side representation of FirewallStatusResource. */ +public interface FirewallStatusResource { + /** + * 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 isPanoramaManaged property: Panorama Managed: Default is False. Default will be CloudSec managed. + * + * @return the isPanoramaManaged value. + */ + BooleanEnum isPanoramaManaged(); + + /** + * Gets the healthStatus property: Current status of the Firewall. + * + * @return the healthStatus value. + */ + HealthStatus healthStatus(); + + /** + * Gets the healthReason property: Detail description of current health of the Firewall. + * + * @return the healthReason value. + */ + String healthReason(); + + /** + * Gets the panoramaStatus property: Panorama Status. + * + * @return the panoramaStatus value. + */ + PanoramaStatus panoramaStatus(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ReadOnlyProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.FirewallStatusResourceInner object. + * + * @return the inner object. + */ + FirewallStatusResourceInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallStatusResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallStatusResourceListResult.java new file mode 100644 index 000000000000..a9428b8c84cf --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FirewallStatusResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FirewallStatusResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a FirewallStatusResource list operation. */ +@Fluent +public final class FirewallStatusResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of FirewallStatusResourceListResult class. */ + public FirewallStatusResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the FirewallStatusResourceListResult object itself. + */ + public FirewallStatusResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the FirewallStatusResourceListResult object itself. + */ + public FirewallStatusResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model FirewallStatusResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FirewallStatusResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Firewalls.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Firewalls.java new file mode 100644 index 000000000000..7bd01674ed08 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Firewalls.java @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LogSettingsInner; + +/** Resource collection API of Firewalls. */ +public interface Firewalls { + /** + * List FirewallResource resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown 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 FirewallResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List FirewallResource resources by subscription 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 response of a FirewallResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List FirewallResource resources by 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 FirewallResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List FirewallResource resources by 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 FirewallResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 FirewallResource along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String firewallName, Context context); + + /** + * Get a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 FirewallResource. + */ + FirewallResource getByResourceGroup(String resourceGroupName, String firewallName); + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 firewallName); + + /** + * Delete a FirewallResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 firewallName, Context context); + + /** + * Get Global Rulestack associated with the Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 global Rulestack associated with the Firewall along with {@link Response}. + */ + Response getGlobalRulestackWithResponse( + String resourceGroupName, String firewallName, Context context); + + /** + * Get Global Rulestack associated with the Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return global Rulestack associated with the Firewall. + */ + GlobalRulestackInfo getGlobalRulestack(String resourceGroupName, String firewallName); + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @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 log Settings for Firewall along with {@link Response}. + */ + Response getLogProfileWithResponse(String resourceGroupName, String firewallName, Context context); + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return log Settings for Firewall. + */ + LogSettings getLogProfile(String resourceGroupName, String firewallName); + + /** + * support info for firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param email email address on behalf of which this API called. + * @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 support information for the resource along with {@link Response}. + */ + Response getSupportInfoWithResponse( + String resourceGroupName, String firewallName, String email, Context context); + + /** + * support info for firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource. + */ + SupportInfo getSupportInfo(String resourceGroupName, String firewallName); + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @param logSettings Log Settings for Firewall. + * @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 Response}. + */ + Response saveLogProfileWithResponse( + String resourceGroupName, String firewallName, LogSettingsInner logSettings, Context context); + + /** + * Log Profile for Firewall. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 saveLogProfile(String resourceGroupName, String firewallName); + + /** + * Get a FirewallResource. + * + * @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 FirewallResource along with {@link Response}. + */ + FirewallResource getById(String id); + + /** + * Get a FirewallResource. + * + * @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 FirewallResource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a FirewallResource. + * + * @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 a FirewallResource. + * + * @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 FirewallResource resource. + * + * @param name resource name. + * @return the first stage of the new FirewallResource definition. + */ + FirewallResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListGlobalRulestackResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListGlobalRulestackResource.java new file mode 100644 index 000000000000..75b00860d95c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListGlobalRulestackResource.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListGlobalRulestackResourceInner; +import java.util.List; + +/** An immutable client-side representation of FqdnListGlobalRulestackResource. */ +public interface FqdnListGlobalRulestackResource { + /** + * 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 description property: fqdn object description. + * + * @return the description value. + */ + String description(); + + /** + * Gets the fqdnList property: fqdn list. + * + * @return the fqdnList value. + */ + List fqdnList(); + + /** + * Gets the etag property: etag info. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + String auditComment(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListGlobalRulestackResourceInner + * object. + * + * @return the inner object. + */ + FqdnListGlobalRulestackResourceInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListGlobalRulestackResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListGlobalRulestackResourceListResult.java new file mode 100644 index 000000000000..c416f918c286 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListGlobalRulestackResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListGlobalRulestackResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a FqdnListGlobalRulestackResource list operation. */ +@Fluent +public final class FqdnListGlobalRulestackResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of FqdnListGlobalRulestackResourceListResult class. */ + public FqdnListGlobalRulestackResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the FqdnListGlobalRulestackResourceListResult object itself. + */ + public FqdnListGlobalRulestackResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the FqdnListGlobalRulestackResourceListResult object itself. + */ + public FqdnListGlobalRulestackResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model FqdnListGlobalRulestackResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FqdnListGlobalRulestackResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListGlobalRulestacks.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListGlobalRulestacks.java new file mode 100644 index 000000000000..e081a3dc8fe8 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListGlobalRulestacks.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListGlobalRulestackResourceInner; + +/** Resource collection API of FqdnListGlobalRulestacks. */ +public interface FqdnListGlobalRulestacks { + /** + * List FqdnListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 FqdnListGlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(String globalRulestackName); + + /** + * List FqdnListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 FqdnListGlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(String globalRulestackName, Context context); + + /** + * Get a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @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 FqdnListGlobalRulestackResource along with {@link Response}. + */ + Response getWithResponse(String globalRulestackName, String name, Context context); + + /** + * Get a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 FqdnListGlobalRulestackResource. + */ + FqdnListGlobalRulestackResource get(String globalRulestackName, String name); + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList. + */ + FqdnListGlobalRulestackResource createOrUpdate( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource); + + /** + * Create a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @param resource 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 globalRulestack fqdnList. + */ + FqdnListGlobalRulestackResource createOrUpdate( + String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource, Context context); + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 globalRulestackName, String name); + + /** + * Delete a FqdnListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name fqdn list name. + * @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 globalRulestackName, String name, Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListLocalRulestackResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListLocalRulestackResource.java new file mode 100644 index 000000000000..ed8c43717340 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListLocalRulestackResource.java @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListLocalRulestackResourceInner; +import java.util.List; + +/** An immutable client-side representation of FqdnListLocalRulestackResource. */ +public interface FqdnListLocalRulestackResource { + /** + * 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 description property: fqdn object description. + * + * @return the description value. + */ + String description(); + + /** + * Gets the fqdnList property: fqdn list. + * + * @return the fqdnList value. + */ + List fqdnList(); + + /** + * Gets the etag property: etag info. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + String auditComment(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListLocalRulestackResourceInner + * object. + * + * @return the inner object. + */ + FqdnListLocalRulestackResourceInner innerModel(); + + /** The entirety of the FqdnListLocalRulestackResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithFqdnList, + DefinitionStages.WithCreate { + } + /** The FqdnListLocalRulestackResource definition stages. */ + interface DefinitionStages { + /** The first stage of the FqdnListLocalRulestackResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the FqdnListLocalRulestackResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, localRulestackName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @return the next definition stage. + */ + WithFqdnList withExistingLocalRulestack(String resourceGroupName, String localRulestackName); + } + /** The stage of the FqdnListLocalRulestackResource definition allowing to specify fqdnList. */ + interface WithFqdnList { + /** + * Specifies the fqdnList property: fqdn list. + * + * @param fqdnList fqdn list. + * @return the next definition stage. + */ + WithCreate withFqdnList(List fqdnList); + } + /** + * The stage of the FqdnListLocalRulestackResource 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.WithDescription, DefinitionStages.WithEtag, DefinitionStages.WithAuditComment { + /** + * Executes the create request. + * + * @return the created resource. + */ + FqdnListLocalRulestackResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + FqdnListLocalRulestackResource create(Context context); + } + /** The stage of the FqdnListLocalRulestackResource definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: fqdn object description. + * + * @param description fqdn object description. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the FqdnListLocalRulestackResource definition allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: etag info. + * + * @param etag etag info. + * @return the next definition stage. + */ + WithCreate withEtag(String etag); + } + /** The stage of the FqdnListLocalRulestackResource definition allowing to specify auditComment. */ + interface WithAuditComment { + /** + * Specifies the auditComment property: comment for this object. + * + * @param auditComment comment for this object. + * @return the next definition stage. + */ + WithCreate withAuditComment(String auditComment); + } + } + /** + * Begins update for the FqdnListLocalRulestackResource resource. + * + * @return the stage of resource update. + */ + FqdnListLocalRulestackResource.Update update(); + + /** The template for FqdnListLocalRulestackResource update. */ + interface Update + extends UpdateStages.WithDescription, + UpdateStages.WithFqdnList, + UpdateStages.WithEtag, + UpdateStages.WithAuditComment { + /** + * Executes the update request. + * + * @return the updated resource. + */ + FqdnListLocalRulestackResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + FqdnListLocalRulestackResource apply(Context context); + } + /** The FqdnListLocalRulestackResource update stages. */ + interface UpdateStages { + /** The stage of the FqdnListLocalRulestackResource update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: fqdn object description. + * + * @param description fqdn object description. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the FqdnListLocalRulestackResource update allowing to specify fqdnList. */ + interface WithFqdnList { + /** + * Specifies the fqdnList property: fqdn list. + * + * @param fqdnList fqdn list. + * @return the next definition stage. + */ + Update withFqdnList(List fqdnList); + } + /** The stage of the FqdnListLocalRulestackResource update allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: etag info. + * + * @param etag etag info. + * @return the next definition stage. + */ + Update withEtag(String etag); + } + /** The stage of the FqdnListLocalRulestackResource update allowing to specify auditComment. */ + interface WithAuditComment { + /** + * Specifies the auditComment property: comment for this object. + * + * @param auditComment comment for this object. + * @return the next definition stage. + */ + Update withAuditComment(String auditComment); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + FqdnListLocalRulestackResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + FqdnListLocalRulestackResource refresh(Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListLocalRulestackResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListLocalRulestackResourceListResult.java new file mode 100644 index 000000000000..f542a7c7dabb --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListLocalRulestackResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListLocalRulestackResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a FqdnListLocalRulestackResource list operation. */ +@Fluent +public final class FqdnListLocalRulestackResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of FqdnListLocalRulestackResourceListResult class. */ + public FqdnListLocalRulestackResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the FqdnListLocalRulestackResourceListResult object itself. + */ + public FqdnListLocalRulestackResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the FqdnListLocalRulestackResourceListResult object itself. + */ + public FqdnListLocalRulestackResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model FqdnListLocalRulestackResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FqdnListLocalRulestackResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListLocalRulestacks.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListLocalRulestacks.java new file mode 100644 index 000000000000..0ae53dadf38f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FqdnListLocalRulestacks.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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 FqdnListLocalRulestacks. */ +public interface FqdnListLocalRulestacks { + /** + * List FqdnListLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 FqdnListLocalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName); + + /** + * List FqdnListLocalRulestackResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 FqdnListLocalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context); + + /** + * Get a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @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 FqdnListLocalRulestackResource along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String localRulestackName, String name, Context context); + + /** + * Get a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 FqdnListLocalRulestackResource. + */ + FqdnListLocalRulestackResource get(String resourceGroupName, String localRulestackName, String name); + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 localRulestackName, String name); + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name fqdn list name. + * @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 localRulestackName, String name, Context context); + + /** + * Get a FqdnListLocalRulestackResource. + * + * @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 FqdnListLocalRulestackResource along with {@link Response}. + */ + FqdnListLocalRulestackResource getById(String id); + + /** + * Get a FqdnListLocalRulestackResource. + * + * @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 FqdnListLocalRulestackResource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a FqdnListLocalRulestackResource. + * + * @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 a FqdnListLocalRulestackResource. + * + * @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 FqdnListLocalRulestackResource resource. + * + * @param name resource name. + * @return the first stage of the new FqdnListLocalRulestackResource definition. + */ + FqdnListLocalRulestackResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FrontendSetting.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FrontendSetting.java new file mode 100644 index 000000000000..56302985880c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/FrontendSetting.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Frontend setting for Firewall. */ +@Fluent +public final class FrontendSetting { + /* + * Settings name + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Protocol Type + */ + @JsonProperty(value = "protocol", required = true) + private ProtocolType protocol; + + /* + * Frontend configurations + */ + @JsonProperty(value = "frontendConfiguration", required = true) + private EndpointConfiguration frontendConfiguration; + + /* + * Backend configurations + */ + @JsonProperty(value = "backendConfiguration", required = true) + private EndpointConfiguration backendConfiguration; + + /** Creates an instance of FrontendSetting class. */ + public FrontendSetting() { + } + + /** + * Get the name property: Settings name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Settings name. + * + * @param name the name value to set. + * @return the FrontendSetting object itself. + */ + public FrontendSetting withName(String name) { + this.name = name; + return this; + } + + /** + * Get the protocol property: Protocol Type. + * + * @return the protocol value. + */ + public ProtocolType protocol() { + return this.protocol; + } + + /** + * Set the protocol property: Protocol Type. + * + * @param protocol the protocol value to set. + * @return the FrontendSetting object itself. + */ + public FrontendSetting withProtocol(ProtocolType protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the frontendConfiguration property: Frontend configurations. + * + * @return the frontendConfiguration value. + */ + public EndpointConfiguration frontendConfiguration() { + return this.frontendConfiguration; + } + + /** + * Set the frontendConfiguration property: Frontend configurations. + * + * @param frontendConfiguration the frontendConfiguration value to set. + * @return the FrontendSetting object itself. + */ + public FrontendSetting withFrontendConfiguration(EndpointConfiguration frontendConfiguration) { + this.frontendConfiguration = frontendConfiguration; + return this; + } + + /** + * Get the backendConfiguration property: Backend configurations. + * + * @return the backendConfiguration value. + */ + public EndpointConfiguration backendConfiguration() { + return this.backendConfiguration; + } + + /** + * Set the backendConfiguration property: Backend configurations. + * + * @param backendConfiguration the backendConfiguration value to set. + * @return the FrontendSetting object itself. + */ + public FrontendSetting withBackendConfiguration(EndpointConfiguration backendConfiguration) { + this.backendConfiguration = backendConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model FrontendSetting")); + } + if (protocol() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property protocol in model FrontendSetting")); + } + if (frontendConfiguration() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property frontendConfiguration in model FrontendSetting")); + } else { + frontendConfiguration().validate(); + } + if (backendConfiguration() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property backendConfiguration in model FrontendSetting")); + } else { + backendConfiguration().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FrontendSetting.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackInfo.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackInfo.java new file mode 100644 index 000000000000..c847c374c129 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackInfo.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackInfoInner; + +/** An immutable client-side representation of GlobalRulestackInfo. */ +public interface GlobalRulestackInfo { + /** + * Gets the azureId property: rulestack description. + * + * @return the azureId value. + */ + String azureId(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackInfoInner object. + * + * @return the inner object. + */ + GlobalRulestackInfoInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResource.java new file mode 100644 index 000000000000..c3c15dca332d --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResource.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackResourceInner; +import java.util.List; + +/** An immutable client-side representation of GlobalRulestackResource. */ +public interface GlobalRulestackResource { + /** + * 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: Global Location. + * + * @return the location value. + */ + String location(); + + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + AzureResourceManagerManagedIdentityProperties identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the panEtag property: PanEtag info. + * + * @return the panEtag value. + */ + String panEtag(); + + /** + * Gets the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * + * @return the panLocation value. + */ + String panLocation(); + + /** + * Gets the scope property: Rulestack Type. + * + * @return the scope value. + */ + ScopeType scope(); + + /** + * Gets the associatedSubscriptions property: subscription scope of global rulestack. + * + * @return the associatedSubscriptions value. + */ + List associatedSubscriptions(); + + /** + * Gets the description property: rulestack description. + * + * @return the description value. + */ + String description(); + + /** + * Gets the defaultMode property: Mode for default rules creation. + * + * @return the defaultMode value. + */ + DefaultMode defaultMode(); + + /** + * Gets the minAppIdVersion property: minimum version. + * + * @return the minAppIdVersion value. + */ + String minAppIdVersion(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the securityServices property: Security Profile. + * + * @return the securityServices value. + */ + SecurityServices securityServices(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackResourceInner object. + * + * @return the inner object. + */ + GlobalRulestackResourceInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResourceListResult.java new file mode 100644 index 000000000000..a9096d722d49 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a GlobalRulestackResource list operation. */ +@Fluent +public final class GlobalRulestackResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of GlobalRulestackResourceListResult class. */ + public GlobalRulestackResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the GlobalRulestackResourceListResult object itself. + */ + public GlobalRulestackResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the GlobalRulestackResourceListResult object itself. + */ + public GlobalRulestackResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model GlobalRulestackResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GlobalRulestackResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResourceUpdate.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResourceUpdate.java new file mode 100644 index 000000000000..7508a6a8669c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResourceUpdate.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The type used for update operations of the GlobalRulestackResource. */ +@Fluent +public final class GlobalRulestackResourceUpdate { + /* + * Global Location + */ + @JsonProperty(value = "location") + private String location; + + /* + * The managed service identities assigned to this resource. + */ + @JsonProperty(value = "identity") + private AzureResourceManagerManagedIdentityProperties identity; + + /* + * The updatable properties of the GlobalRulestackResource. + */ + @JsonProperty(value = "properties") + private GlobalRulestackResourceUpdateProperties properties; + + /** Creates an instance of GlobalRulestackResourceUpdate class. */ + public GlobalRulestackResourceUpdate() { + } + + /** + * Get the location property: Global Location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Global Location. + * + * @param location the location value to set. + * @return the GlobalRulestackResourceUpdate object itself. + */ + public GlobalRulestackResourceUpdate withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public AzureResourceManagerManagedIdentityProperties 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 GlobalRulestackResourceUpdate object itself. + */ + public GlobalRulestackResourceUpdate withIdentity(AzureResourceManagerManagedIdentityProperties identity) { + this.identity = identity; + return this; + } + + /** + * Get the properties property: The updatable properties of the GlobalRulestackResource. + * + * @return the properties value. + */ + public GlobalRulestackResourceUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The updatable properties of the GlobalRulestackResource. + * + * @param properties the properties value to set. + * @return the GlobalRulestackResourceUpdate object itself. + */ + public GlobalRulestackResourceUpdate withProperties(GlobalRulestackResourceUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResourceUpdateProperties.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResourceUpdateProperties.java new file mode 100644 index 000000000000..e83704ab2c1b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestackResourceUpdateProperties.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The updatable properties of the GlobalRulestackResource. */ +@Fluent +public final class GlobalRulestackResourceUpdateProperties { + /* + * PanEtag info + */ + @JsonProperty(value = "panEtag") + private String panEtag; + + /* + * Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks + */ + @JsonProperty(value = "panLocation") + private String panLocation; + + /* + * Rulestack Type + */ + @JsonProperty(value = "scope") + private ScopeType scope; + + /* + * subscription scope of global rulestack + */ + @JsonProperty(value = "associatedSubscriptions") + private List associatedSubscriptions; + + /* + * rulestack description + */ + @JsonProperty(value = "description") + private String description; + + /* + * Mode for default rules creation + */ + @JsonProperty(value = "defaultMode") + private DefaultMode defaultMode; + + /* + * minimum version + */ + @JsonProperty(value = "minAppIdVersion") + private String minAppIdVersion; + + /* + * Security Profile + */ + @JsonProperty(value = "securityServices") + private SecurityServices securityServices; + + /** Creates an instance of GlobalRulestackResourceUpdateProperties class. */ + public GlobalRulestackResourceUpdateProperties() { + } + + /** + * Get the panEtag property: PanEtag info. + * + * @return the panEtag value. + */ + public String panEtag() { + return this.panEtag; + } + + /** + * Set the panEtag property: PanEtag info. + * + * @param panEtag the panEtag value to set. + * @return the GlobalRulestackResourceUpdateProperties object itself. + */ + public GlobalRulestackResourceUpdateProperties withPanEtag(String panEtag) { + this.panEtag = panEtag; + return this; + } + + /** + * Get the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * + * @return the panLocation value. + */ + public String panLocation() { + return this.panLocation; + } + + /** + * Set the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * + * @param panLocation the panLocation value to set. + * @return the GlobalRulestackResourceUpdateProperties object itself. + */ + public GlobalRulestackResourceUpdateProperties withPanLocation(String panLocation) { + this.panLocation = panLocation; + return this; + } + + /** + * Get the scope property: Rulestack Type. + * + * @return the scope value. + */ + public ScopeType scope() { + return this.scope; + } + + /** + * Set the scope property: Rulestack Type. + * + * @param scope the scope value to set. + * @return the GlobalRulestackResourceUpdateProperties object itself. + */ + public GlobalRulestackResourceUpdateProperties withScope(ScopeType scope) { + this.scope = scope; + return this; + } + + /** + * Get the associatedSubscriptions property: subscription scope of global rulestack. + * + * @return the associatedSubscriptions value. + */ + public List associatedSubscriptions() { + return this.associatedSubscriptions; + } + + /** + * Set the associatedSubscriptions property: subscription scope of global rulestack. + * + * @param associatedSubscriptions the associatedSubscriptions value to set. + * @return the GlobalRulestackResourceUpdateProperties object itself. + */ + public GlobalRulestackResourceUpdateProperties withAssociatedSubscriptions(List associatedSubscriptions) { + this.associatedSubscriptions = associatedSubscriptions; + return this; + } + + /** + * Get the description property: rulestack description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: rulestack description. + * + * @param description the description value to set. + * @return the GlobalRulestackResourceUpdateProperties object itself. + */ + public GlobalRulestackResourceUpdateProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the defaultMode property: Mode for default rules creation. + * + * @return the defaultMode value. + */ + public DefaultMode defaultMode() { + return this.defaultMode; + } + + /** + * Set the defaultMode property: Mode for default rules creation. + * + * @param defaultMode the defaultMode value to set. + * @return the GlobalRulestackResourceUpdateProperties object itself. + */ + public GlobalRulestackResourceUpdateProperties withDefaultMode(DefaultMode defaultMode) { + this.defaultMode = defaultMode; + return this; + } + + /** + * Get the minAppIdVersion property: minimum version. + * + * @return the minAppIdVersion value. + */ + public String minAppIdVersion() { + return this.minAppIdVersion; + } + + /** + * Set the minAppIdVersion property: minimum version. + * + * @param minAppIdVersion the minAppIdVersion value to set. + * @return the GlobalRulestackResourceUpdateProperties object itself. + */ + public GlobalRulestackResourceUpdateProperties withMinAppIdVersion(String minAppIdVersion) { + this.minAppIdVersion = minAppIdVersion; + return this; + } + + /** + * Get the securityServices property: Security Profile. + * + * @return the securityServices value. + */ + public SecurityServices securityServices() { + return this.securityServices; + } + + /** + * Set the securityServices property: Security Profile. + * + * @param securityServices the securityServices value to set. + * @return the GlobalRulestackResourceUpdateProperties object itself. + */ + public GlobalRulestackResourceUpdateProperties withSecurityServices(SecurityServices securityServices) { + this.securityServices = securityServices; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (securityServices() != null) { + securityServices().validate(); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestacks.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestacks.java new file mode 100644 index 000000000000..2c875c32bfc6 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/GlobalRulestacks.java @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackResourceInner; + +/** Resource collection API of GlobalRulestacks. */ +public interface GlobalRulestacks { + /** + * List GlobalRulestackResource resources by Tenant. + * + * @throws com.azure.core.management.exception.ManagementException thrown 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 GlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(); + + /** + * List GlobalRulestackResource resources by Tenant. + * + * @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 GlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Get a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 GlobalRulestackResource along with {@link Response}. + */ + Response getWithResponse(String globalRulestackName, Context context); + + /** + * Get a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 GlobalRulestackResource. + */ + GlobalRulestackResource get(String globalRulestackName); + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack. + */ + GlobalRulestackResource createOrUpdate(String globalRulestackName, GlobalRulestackResourceInner resource); + + /** + * Create a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param resource 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 paloAltoNetworks GlobalRulestack. + */ + GlobalRulestackResource createOrUpdate( + String globalRulestackName, GlobalRulestackResourceInner resource, Context context); + + /** + * Update a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param properties 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 paloAltoNetworks GlobalRulestack along with {@link Response}. + */ + Response updateWithResponse( + String globalRulestackName, GlobalRulestackResourceUpdate properties, Context context); + + /** + * Update a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param properties 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 paloAltoNetworks GlobalRulestack. + */ + GlobalRulestackResource update(String globalRulestackName, GlobalRulestackResourceUpdate properties); + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 globalRulestackName); + + /** + * Delete a GlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 globalRulestackName, Context context); + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 commit(String globalRulestackName); + + /** + * Commit rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 commit(String globalRulestackName, Context context); + + /** + * Get changelog. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 changelog along with {@link Response}. + */ + Response getChangeLogWithResponse(String globalRulestackName, Context context); + + /** + * Get changelog. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog. + */ + Changelog getChangeLog(String globalRulestackName); + + /** + * Get the list of advanced security objects. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 list of advanced security objects along with {@link Response}. + */ + Response listAdvancedSecurityObjectsWithResponse( + String globalRulestackName, AdvSecurityObjectTypeEnum type, String skip, Integer top, Context context); + + /** + * Get the list of advanced security objects. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects. + */ + AdvSecurityObjectListResponse listAdvancedSecurityObjects( + String globalRulestackName, AdvSecurityObjectTypeEnum type); + + /** + * List of AppIds for GlobalRulestack ApiVersion. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param appIdVersion The appIdVersion parameter. + * @param appPrefix The appPrefix parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 body along with {@link Response}. + */ + Response listAppIdsWithResponse( + String globalRulestackName, String appIdVersion, String appPrefix, String skip, Integer top, Context context); + + /** + * List of AppIds for GlobalRulestack ApiVersion. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ListAppIdResponse listAppIds(String globalRulestackName); + + /** + * List of countries for Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 countries Response Object along with {@link Response}. + */ + Response listCountriesWithResponse( + String globalRulestackName, String skip, Integer top, Context context); + + /** + * List of countries for Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object. + */ + CountriesResponse listCountries(String globalRulestackName); + + /** + * List of Firewalls associated with Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 firewalls response along with {@link Response}. + */ + Response listFirewallsWithResponse(String globalRulestackName, Context context); + + /** + * List of Firewalls associated with Rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response. + */ + ListFirewallsResponse listFirewalls(String globalRulestackName); + + /** + * List predefined URL categories for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 predefined url categories response along with {@link Response}. + */ + Response listPredefinedUrlCategoriesWithResponse( + String globalRulestackName, String skip, Integer top, Context context); + + /** + * List predefined URL categories for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response. + */ + PredefinedUrlCategoriesResponse listPredefinedUrlCategories(String globalRulestackName); + + /** + * List the security services for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 security services list response along with {@link Response}. + */ + Response listSecurityServicesWithResponse( + String globalRulestackName, SecurityServicesTypeEnum type, String skip, Integer top, Context context); + + /** + * List the security services for rulestack. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response. + */ + SecurityServicesResponse listSecurityServices(String globalRulestackName, SecurityServicesTypeEnum type); + + /** + * Revert rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 Response}. + */ + Response revertWithResponse(String globalRulestackName, Context context); + + /** + * Revert rulestack configuration. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 revert(String globalRulestackName); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/HealthStatus.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/HealthStatus.java new file mode 100644 index 000000000000..150d7c9dc399 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/HealthStatus.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Status Codes for the Firewall. */ +public final class HealthStatus extends ExpandableStringEnum { + /** Static value GREEN for HealthStatus. */ + public static final HealthStatus GREEN = fromString("GREEN"); + + /** Static value YELLOW for HealthStatus. */ + public static final HealthStatus YELLOW = fromString("YELLOW"); + + /** Static value RED for HealthStatus. */ + public static final HealthStatus RED = fromString("RED"); + + /** Static value INITIALIZING for HealthStatus. */ + public static final HealthStatus INITIALIZING = fromString("INITIALIZING"); + + /** + * Creates a new instance of HealthStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HealthStatus() { + } + + /** + * Creates or finds a HealthStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding HealthStatus. + */ + @JsonCreator + public static HealthStatus fromString(String name) { + return fromString(name, HealthStatus.class); + } + + /** + * Gets known HealthStatus values. + * + * @return known HealthStatus values. + */ + public static Collection values() { + return values(HealthStatus.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/IpAddress.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/IpAddress.java new file mode 100644 index 000000000000..4e13b46cfaef --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/IpAddress.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** IP Address. */ +@Fluent +public final class IpAddress { + /* + * Resource Id + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * Address value + */ + @JsonProperty(value = "address") + private String address; + + /** Creates an instance of IpAddress class. */ + public IpAddress() { + } + + /** + * Get the resourceId property: Resource Id. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Resource Id. + * + * @param resourceId the resourceId value to set. + * @return the IpAddress object itself. + */ + public IpAddress withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the address property: Address value. + * + * @return the address value. + */ + public String address() { + return this.address; + } + + /** + * Set the address property: Address value. + * + * @param address the address value to set. + * @return the IpAddress object itself. + */ + public IpAddress withAddress(String address) { + this.address = address; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/IpAddressSpace.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/IpAddressSpace.java new file mode 100644 index 000000000000..e6c86b63eb71 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/IpAddressSpace.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** IP Address Space. */ +@Fluent +public final class IpAddressSpace { + /* + * Resource Id + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * Address Space + */ + @JsonProperty(value = "addressSpace") + private String addressSpace; + + /** Creates an instance of IpAddressSpace class. */ + public IpAddressSpace() { + } + + /** + * Get the resourceId property: Resource Id. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Resource Id. + * + * @param resourceId the resourceId value to set. + * @return the IpAddressSpace object itself. + */ + public IpAddressSpace withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the addressSpace property: Address Space. + * + * @return the addressSpace value. + */ + public String addressSpace() { + return this.addressSpace; + } + + /** + * Set the addressSpace property: Address Space. + * + * @param addressSpace the addressSpace value to set. + * @return the IpAddressSpace object itself. + */ + public IpAddressSpace withAddressSpace(String addressSpace) { + this.addressSpace = addressSpace; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ListAppIdResponse.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ListAppIdResponse.java new file mode 100644 index 000000000000..b398c6319913 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ListAppIdResponse.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListAppIdResponseInner; +import java.util.List; + +/** An immutable client-side representation of ListAppIdResponse. */ +public interface ListAppIdResponse { + /** + * Gets the value property: List of AppIds. + * + * @return the value value. + */ + List value(); + + /** + * Gets the nextLink property: next Link. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.ListAppIdResponseInner object. + * + * @return the inner object. + */ + ListAppIdResponseInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ListFirewallsResponse.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ListFirewallsResponse.java new file mode 100644 index 000000000000..1e431be23fb8 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ListFirewallsResponse.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.ListFirewallsResponseInner; +import java.util.List; + +/** An immutable client-side representation of ListFirewallsResponse. */ +public interface ListFirewallsResponse { + /** + * Gets the value property: firewalls list. + * + * @return the value value. + */ + List value(); + + /** + * Gets the nextLink property: next link. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.ListFirewallsResponseInner object. + * + * @return the inner object. + */ + ListFirewallsResponseInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRules.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRules.java new file mode 100644 index 000000000000..de0b06072ec2 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRules.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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 LocalRules. */ +public interface LocalRules { + /** + * List LocalRulesResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 LocalRulesResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByLocalRulestacks(String resourceGroupName, String localRulestackName); + + /** + * List LocalRulesResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 LocalRulesResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context); + + /** + * Get a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @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 LocalRulesResource along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String localRulestackName, String priority, Context context); + + /** + * Get a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 LocalRulesResource. + */ + LocalRulesResource get(String resourceGroupName, String localRulestackName, String priority); + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 localRulestackName, String priority); + + /** + * Delete a LocalRulesResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @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 localRulestackName, String priority, Context context); + + /** + * Get counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @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 counters along with {@link Response}. + */ + Response getCountersWithResponse( + String resourceGroupName, String localRulestackName, String priority, String firewallName, Context context); + + /** + * Get counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters. + */ + RuleCounter getCounters(String resourceGroupName, String localRulestackName, String priority); + + /** + * Refresh counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @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 Response}. + */ + Response refreshCountersWithResponse( + String resourceGroupName, String localRulestackName, String priority, String firewallName, Context context); + + /** + * Refresh counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 refreshCounters(String resourceGroupName, String localRulestackName, String priority); + + /** + * Reset counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @param firewallName The firewallName parameter. + * @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 rule counter reset along with {@link Response}. + */ + Response resetCountersWithResponse( + String resourceGroupName, String localRulestackName, String priority, String firewallName, Context context); + + /** + * Reset counters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param priority Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset. + */ + RuleCounterReset resetCounters(String resourceGroupName, String localRulestackName, String priority); + + /** + * Get a LocalRulesResource. + * + * @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 LocalRulesResource along with {@link Response}. + */ + LocalRulesResource getById(String id); + + /** + * Get a LocalRulesResource. + * + * @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 LocalRulesResource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a LocalRulesResource. + * + * @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 a LocalRulesResource. + * + * @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 LocalRulesResource resource. + * + * @param name resource name. + * @return the first stage of the new LocalRulesResource definition. + */ + LocalRulesResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulesResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulesResource.java new file mode 100644 index 000000000000..e80e9d201711 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulesResource.java @@ -0,0 +1,739 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LocalRulesResourceInner; +import java.util.List; + +/** An immutable client-side representation of LocalRulesResource. */ +public interface LocalRulesResource { + /** + * 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 etag property: etag info. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the ruleName property: rule name. + * + * @return the ruleName value. + */ + String ruleName(); + + /** + * Gets the priority property: The priority property. + * + * @return the priority value. + */ + Integer priority(); + + /** + * Gets the description property: rule description. + * + * @return the description value. + */ + String description(); + + /** + * Gets the ruleState property: state of this rule. + * + * @return the ruleState value. + */ + StateEnum ruleState(); + + /** + * Gets the source property: source address. + * + * @return the source value. + */ + SourceAddr source(); + + /** + * Gets the negateSource property: cidr should not be 'any'. + * + * @return the negateSource value. + */ + BooleanEnum negateSource(); + + /** + * Gets the destination property: destination address. + * + * @return the destination value. + */ + DestinationAddr destination(); + + /** + * Gets the negateDestination property: cidr should not be 'any'. + * + * @return the negateDestination value. + */ + BooleanEnum negateDestination(); + + /** + * Gets the applications property: array of rule applications. + * + * @return the applications value. + */ + List applications(); + + /** + * Gets the category property: rule category. + * + * @return the category value. + */ + Category category(); + + /** + * Gets the protocol property: any, application-default, TCP:number, UDP:number. + * + * @return the protocol value. + */ + String protocol(); + + /** + * Gets the protocolPortList property: prot port list. + * + * @return the protocolPortList value. + */ + List protocolPortList(); + + /** + * Gets the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @return the inboundInspectionCertificate value. + */ + String inboundInspectionCertificate(); + + /** + * Gets the auditComment property: rule comment. + * + * @return the auditComment value. + */ + String auditComment(); + + /** + * Gets the actionType property: rule action. + * + * @return the actionType value. + */ + ActionEnum actionType(); + + /** + * Gets the enableLogging property: enable or disable logging. + * + * @return the enableLogging value. + */ + StateEnum enableLogging(); + + /** + * Gets the decryptionRuleType property: enable or disable decryption. + * + * @return the decryptionRuleType value. + */ + DecryptionRuleTypeEnum decryptionRuleType(); + + /** + * Gets the tags property: tag for rule. + * + * @return the tags value. + */ + List tags(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.LocalRulesResourceInner object. + * + * @return the inner object. + */ + LocalRulesResourceInner innerModel(); + + /** The entirety of the LocalRulesResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithRuleName, + DefinitionStages.WithCreate { + } + /** The LocalRulesResource definition stages. */ + interface DefinitionStages { + /** The first stage of the LocalRulesResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the LocalRulesResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, localRulestackName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @return the next definition stage. + */ + WithRuleName withExistingLocalRulestack(String resourceGroupName, String localRulestackName); + } + /** The stage of the LocalRulesResource definition allowing to specify ruleName. */ + interface WithRuleName { + /** + * Specifies the ruleName property: rule name. + * + * @param ruleName rule name. + * @return the next definition stage. + */ + WithCreate withRuleName(String ruleName); + } + /** + * The stage of the LocalRulesResource 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.WithEtag, + DefinitionStages.WithDescription, + DefinitionStages.WithRuleState, + DefinitionStages.WithSource, + DefinitionStages.WithNegateSource, + DefinitionStages.WithDestination, + DefinitionStages.WithNegateDestination, + DefinitionStages.WithApplications, + DefinitionStages.WithCategory, + DefinitionStages.WithProtocol, + DefinitionStages.WithProtocolPortList, + DefinitionStages.WithInboundInspectionCertificate, + DefinitionStages.WithAuditComment, + DefinitionStages.WithActionType, + DefinitionStages.WithEnableLogging, + DefinitionStages.WithDecryptionRuleType { + /** + * Executes the create request. + * + * @return the created resource. + */ + LocalRulesResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + LocalRulesResource create(Context context); + } + /** The stage of the LocalRulesResource definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: tag for rule. + * + * @param tags tag for rule. + * @return the next definition stage. + */ + WithCreate withTags(List tags); + } + /** The stage of the LocalRulesResource definition allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: etag info. + * + * @param etag etag info. + * @return the next definition stage. + */ + WithCreate withEtag(String etag); + } + /** The stage of the LocalRulesResource definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: rule description. + * + * @param description rule description. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the LocalRulesResource definition allowing to specify ruleState. */ + interface WithRuleState { + /** + * Specifies the ruleState property: state of this rule. + * + * @param ruleState state of this rule. + * @return the next definition stage. + */ + WithCreate withRuleState(StateEnum ruleState); + } + /** The stage of the LocalRulesResource definition allowing to specify source. */ + interface WithSource { + /** + * Specifies the source property: source address. + * + * @param source source address. + * @return the next definition stage. + */ + WithCreate withSource(SourceAddr source); + } + /** The stage of the LocalRulesResource definition allowing to specify negateSource. */ + interface WithNegateSource { + /** + * Specifies the negateSource property: cidr should not be 'any'. + * + * @param negateSource cidr should not be 'any'. + * @return the next definition stage. + */ + WithCreate withNegateSource(BooleanEnum negateSource); + } + /** The stage of the LocalRulesResource definition allowing to specify destination. */ + interface WithDestination { + /** + * Specifies the destination property: destination address. + * + * @param destination destination address. + * @return the next definition stage. + */ + WithCreate withDestination(DestinationAddr destination); + } + /** The stage of the LocalRulesResource definition allowing to specify negateDestination. */ + interface WithNegateDestination { + /** + * Specifies the negateDestination property: cidr should not be 'any'. + * + * @param negateDestination cidr should not be 'any'. + * @return the next definition stage. + */ + WithCreate withNegateDestination(BooleanEnum negateDestination); + } + /** The stage of the LocalRulesResource definition allowing to specify applications. */ + interface WithApplications { + /** + * Specifies the applications property: array of rule applications. + * + * @param applications array of rule applications. + * @return the next definition stage. + */ + WithCreate withApplications(List applications); + } + /** The stage of the LocalRulesResource definition allowing to specify category. */ + interface WithCategory { + /** + * Specifies the category property: rule category. + * + * @param category rule category. + * @return the next definition stage. + */ + WithCreate withCategory(Category category); + } + /** The stage of the LocalRulesResource definition allowing to specify protocol. */ + interface WithProtocol { + /** + * Specifies the protocol property: any, application-default, TCP:number, UDP:number. + * + * @param protocol any, application-default, TCP:number, UDP:number. + * @return the next definition stage. + */ + WithCreate withProtocol(String protocol); + } + /** The stage of the LocalRulesResource definition allowing to specify protocolPortList. */ + interface WithProtocolPortList { + /** + * Specifies the protocolPortList property: prot port list. + * + * @param protocolPortList prot port list. + * @return the next definition stage. + */ + WithCreate withProtocolPortList(List protocolPortList); + } + /** The stage of the LocalRulesResource definition allowing to specify inboundInspectionCertificate. */ + interface WithInboundInspectionCertificate { + /** + * Specifies the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @param inboundInspectionCertificate inbound Inspection Certificate. + * @return the next definition stage. + */ + WithCreate withInboundInspectionCertificate(String inboundInspectionCertificate); + } + /** The stage of the LocalRulesResource definition allowing to specify auditComment. */ + interface WithAuditComment { + /** + * Specifies the auditComment property: rule comment. + * + * @param auditComment rule comment. + * @return the next definition stage. + */ + WithCreate withAuditComment(String auditComment); + } + /** The stage of the LocalRulesResource definition allowing to specify actionType. */ + interface WithActionType { + /** + * Specifies the actionType property: rule action. + * + * @param actionType rule action. + * @return the next definition stage. + */ + WithCreate withActionType(ActionEnum actionType); + } + /** The stage of the LocalRulesResource definition allowing to specify enableLogging. */ + interface WithEnableLogging { + /** + * Specifies the enableLogging property: enable or disable logging. + * + * @param enableLogging enable or disable logging. + * @return the next definition stage. + */ + WithCreate withEnableLogging(StateEnum enableLogging); + } + /** The stage of the LocalRulesResource definition allowing to specify decryptionRuleType. */ + interface WithDecryptionRuleType { + /** + * Specifies the decryptionRuleType property: enable or disable decryption. + * + * @param decryptionRuleType enable or disable decryption. + * @return the next definition stage. + */ + WithCreate withDecryptionRuleType(DecryptionRuleTypeEnum decryptionRuleType); + } + } + /** + * Begins update for the LocalRulesResource resource. + * + * @return the stage of resource update. + */ + LocalRulesResource.Update update(); + + /** The template for LocalRulesResource update. */ + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithEtag, + UpdateStages.WithRuleName, + UpdateStages.WithDescription, + UpdateStages.WithRuleState, + UpdateStages.WithSource, + UpdateStages.WithNegateSource, + UpdateStages.WithDestination, + UpdateStages.WithNegateDestination, + UpdateStages.WithApplications, + UpdateStages.WithCategory, + UpdateStages.WithProtocol, + UpdateStages.WithProtocolPortList, + UpdateStages.WithInboundInspectionCertificate, + UpdateStages.WithAuditComment, + UpdateStages.WithActionType, + UpdateStages.WithEnableLogging, + UpdateStages.WithDecryptionRuleType { + /** + * Executes the update request. + * + * @return the updated resource. + */ + LocalRulesResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + LocalRulesResource apply(Context context); + } + /** The LocalRulesResource update stages. */ + interface UpdateStages { + /** The stage of the LocalRulesResource update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: tag for rule. + * + * @param tags tag for rule. + * @return the next definition stage. + */ + Update withTags(List tags); + } + /** The stage of the LocalRulesResource update allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: etag info. + * + * @param etag etag info. + * @return the next definition stage. + */ + Update withEtag(String etag); + } + /** The stage of the LocalRulesResource update allowing to specify ruleName. */ + interface WithRuleName { + /** + * Specifies the ruleName property: rule name. + * + * @param ruleName rule name. + * @return the next definition stage. + */ + Update withRuleName(String ruleName); + } + /** The stage of the LocalRulesResource update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: rule description. + * + * @param description rule description. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the LocalRulesResource update allowing to specify ruleState. */ + interface WithRuleState { + /** + * Specifies the ruleState property: state of this rule. + * + * @param ruleState state of this rule. + * @return the next definition stage. + */ + Update withRuleState(StateEnum ruleState); + } + /** The stage of the LocalRulesResource update allowing to specify source. */ + interface WithSource { + /** + * Specifies the source property: source address. + * + * @param source source address. + * @return the next definition stage. + */ + Update withSource(SourceAddr source); + } + /** The stage of the LocalRulesResource update allowing to specify negateSource. */ + interface WithNegateSource { + /** + * Specifies the negateSource property: cidr should not be 'any'. + * + * @param negateSource cidr should not be 'any'. + * @return the next definition stage. + */ + Update withNegateSource(BooleanEnum negateSource); + } + /** The stage of the LocalRulesResource update allowing to specify destination. */ + interface WithDestination { + /** + * Specifies the destination property: destination address. + * + * @param destination destination address. + * @return the next definition stage. + */ + Update withDestination(DestinationAddr destination); + } + /** The stage of the LocalRulesResource update allowing to specify negateDestination. */ + interface WithNegateDestination { + /** + * Specifies the negateDestination property: cidr should not be 'any'. + * + * @param negateDestination cidr should not be 'any'. + * @return the next definition stage. + */ + Update withNegateDestination(BooleanEnum negateDestination); + } + /** The stage of the LocalRulesResource update allowing to specify applications. */ + interface WithApplications { + /** + * Specifies the applications property: array of rule applications. + * + * @param applications array of rule applications. + * @return the next definition stage. + */ + Update withApplications(List applications); + } + /** The stage of the LocalRulesResource update allowing to specify category. */ + interface WithCategory { + /** + * Specifies the category property: rule category. + * + * @param category rule category. + * @return the next definition stage. + */ + Update withCategory(Category category); + } + /** The stage of the LocalRulesResource update allowing to specify protocol. */ + interface WithProtocol { + /** + * Specifies the protocol property: any, application-default, TCP:number, UDP:number. + * + * @param protocol any, application-default, TCP:number, UDP:number. + * @return the next definition stage. + */ + Update withProtocol(String protocol); + } + /** The stage of the LocalRulesResource update allowing to specify protocolPortList. */ + interface WithProtocolPortList { + /** + * Specifies the protocolPortList property: prot port list. + * + * @param protocolPortList prot port list. + * @return the next definition stage. + */ + Update withProtocolPortList(List protocolPortList); + } + /** The stage of the LocalRulesResource update allowing to specify inboundInspectionCertificate. */ + interface WithInboundInspectionCertificate { + /** + * Specifies the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @param inboundInspectionCertificate inbound Inspection Certificate. + * @return the next definition stage. + */ + Update withInboundInspectionCertificate(String inboundInspectionCertificate); + } + /** The stage of the LocalRulesResource update allowing to specify auditComment. */ + interface WithAuditComment { + /** + * Specifies the auditComment property: rule comment. + * + * @param auditComment rule comment. + * @return the next definition stage. + */ + Update withAuditComment(String auditComment); + } + /** The stage of the LocalRulesResource update allowing to specify actionType. */ + interface WithActionType { + /** + * Specifies the actionType property: rule action. + * + * @param actionType rule action. + * @return the next definition stage. + */ + Update withActionType(ActionEnum actionType); + } + /** The stage of the LocalRulesResource update allowing to specify enableLogging. */ + interface WithEnableLogging { + /** + * Specifies the enableLogging property: enable or disable logging. + * + * @param enableLogging enable or disable logging. + * @return the next definition stage. + */ + Update withEnableLogging(StateEnum enableLogging); + } + /** The stage of the LocalRulesResource update allowing to specify decryptionRuleType. */ + interface WithDecryptionRuleType { + /** + * Specifies the decryptionRuleType property: enable or disable decryption. + * + * @param decryptionRuleType enable or disable decryption. + * @return the next definition stage. + */ + Update withDecryptionRuleType(DecryptionRuleTypeEnum decryptionRuleType); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + LocalRulesResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + LocalRulesResource refresh(Context context); + + /** + * Get counters. + * + * @param firewallName The firewallName parameter. + * @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 counters along with {@link Response}. + */ + Response getCountersWithResponse(String firewallName, Context context); + + /** + * Get counters. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters. + */ + RuleCounter getCounters(); + + /** + * Refresh counters. + * + * @param firewallName The firewallName parameter. + * @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 Response}. + */ + Response refreshCountersWithResponse(String firewallName, Context context); + + /** + * Refresh counters. + * + * @throws com.azure.core.management.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 refreshCounters(); + + /** + * Reset counters. + * + * @param firewallName The firewallName parameter. + * @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 rule counter reset along with {@link Response}. + */ + Response resetCountersWithResponse(String firewallName, Context context); + + /** + * Reset counters. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset. + */ + RuleCounterReset resetCounters(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulesResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulesResourceListResult.java new file mode 100644 index 000000000000..b94a211dd111 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulesResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LocalRulesResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a LocalRulesResource list operation. */ +@Fluent +public final class LocalRulesResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of LocalRulesResourceListResult class. */ + public LocalRulesResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the LocalRulesResourceListResult object itself. + */ + public LocalRulesResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the LocalRulesResourceListResult object itself. + */ + public LocalRulesResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model LocalRulesResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalRulesResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResource.java new file mode 100644 index 000000000000..2b263aad25bf --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResource.java @@ -0,0 +1,568 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LocalRulestackResourceInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of LocalRulestackResource. */ +public interface LocalRulestackResource { + /** + * 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. + */ + AzureResourceManagerManagedIdentityProperties identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the panEtag property: PanEtag info. + * + * @return the panEtag value. + */ + String panEtag(); + + /** + * Gets the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * + * @return the panLocation value. + */ + String panLocation(); + + /** + * Gets the scope property: Rulestack Type. + * + * @return the scope value. + */ + ScopeType scope(); + + /** + * Gets the associatedSubscriptions property: subscription scope of global rulestack. + * + * @return the associatedSubscriptions value. + */ + List associatedSubscriptions(); + + /** + * Gets the description property: rulestack description. + * + * @return the description value. + */ + String description(); + + /** + * Gets the defaultMode property: Mode for default rules creation. + * + * @return the defaultMode value. + */ + DefaultMode defaultMode(); + + /** + * Gets the minAppIdVersion property: minimum version. + * + * @return the minAppIdVersion value. + */ + String minAppIdVersion(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the securityServices property: Security Profile. + * + * @return the securityServices value. + */ + SecurityServices securityServices(); + + /** + * 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.paloaltonetworks.fluent.models.LocalRulestackResourceInner object. + * + * @return the inner object. + */ + LocalRulestackResourceInner innerModel(); + + /** The entirety of the LocalRulestackResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The LocalRulestackResource definition stages. */ + interface DefinitionStages { + /** The first stage of the LocalRulestackResource definition. */ + interface Blank extends WithLocation { + } + /** The stage of the LocalRulestackResource 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 LocalRulestackResource 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 LocalRulestackResource 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.WithPanEtag, + DefinitionStages.WithPanLocation, + DefinitionStages.WithScope, + DefinitionStages.WithAssociatedSubscriptions, + DefinitionStages.WithDescription, + DefinitionStages.WithDefaultMode, + DefinitionStages.WithMinAppIdVersion, + DefinitionStages.WithSecurityServices { + /** + * Executes the create request. + * + * @return the created resource. + */ + LocalRulestackResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + LocalRulestackResource create(Context context); + } + /** The stage of the LocalRulestackResource 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 LocalRulestackResource 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(AzureResourceManagerManagedIdentityProperties identity); + } + /** The stage of the LocalRulestackResource definition allowing to specify panEtag. */ + interface WithPanEtag { + /** + * Specifies the panEtag property: PanEtag info. + * + * @param panEtag PanEtag info. + * @return the next definition stage. + */ + WithCreate withPanEtag(String panEtag); + } + /** The stage of the LocalRulestackResource definition allowing to specify panLocation. */ + interface WithPanLocation { + /** + * Specifies the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for + * LocalRulestacks. + * + * @param panLocation Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * @return the next definition stage. + */ + WithCreate withPanLocation(String panLocation); + } + /** The stage of the LocalRulestackResource definition allowing to specify scope. */ + interface WithScope { + /** + * Specifies the scope property: Rulestack Type. + * + * @param scope Rulestack Type. + * @return the next definition stage. + */ + WithCreate withScope(ScopeType scope); + } + /** The stage of the LocalRulestackResource definition allowing to specify associatedSubscriptions. */ + interface WithAssociatedSubscriptions { + /** + * Specifies the associatedSubscriptions property: subscription scope of global rulestack. + * + * @param associatedSubscriptions subscription scope of global rulestack. + * @return the next definition stage. + */ + WithCreate withAssociatedSubscriptions(List associatedSubscriptions); + } + /** The stage of the LocalRulestackResource definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: rulestack description. + * + * @param description rulestack description. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the LocalRulestackResource definition allowing to specify defaultMode. */ + interface WithDefaultMode { + /** + * Specifies the defaultMode property: Mode for default rules creation. + * + * @param defaultMode Mode for default rules creation. + * @return the next definition stage. + */ + WithCreate withDefaultMode(DefaultMode defaultMode); + } + /** The stage of the LocalRulestackResource definition allowing to specify minAppIdVersion. */ + interface WithMinAppIdVersion { + /** + * Specifies the minAppIdVersion property: minimum version. + * + * @param minAppIdVersion minimum version. + * @return the next definition stage. + */ + WithCreate withMinAppIdVersion(String minAppIdVersion); + } + /** The stage of the LocalRulestackResource definition allowing to specify securityServices. */ + interface WithSecurityServices { + /** + * Specifies the securityServices property: Security Profile. + * + * @param securityServices Security Profile. + * @return the next definition stage. + */ + WithCreate withSecurityServices(SecurityServices securityServices); + } + } + /** + * Begins update for the LocalRulestackResource resource. + * + * @return the stage of resource update. + */ + LocalRulestackResource.Update update(); + + /** The template for LocalRulestackResource update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + LocalRulestackResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + LocalRulestackResource apply(Context context); + } + /** The LocalRulestackResource update stages. */ + interface UpdateStages { + /** The stage of the LocalRulestackResource 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 LocalRulestackResource 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(AzureResourceManagerManagedIdentityProperties identity); + } + /** The stage of the LocalRulestackResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: The updatable properties of the LocalRulestackResource.. + * + * @param properties The updatable properties of the LocalRulestackResource. + * @return the next definition stage. + */ + Update withProperties(LocalRulestackResourceUpdateProperties properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + LocalRulestackResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + LocalRulestackResource refresh(Context context); + + /** + * Commit rulestack 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. + */ + void commit(); + + /** + * Commit rulestack 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. + */ + void commit(Context context); + + /** + * Get changelog. + * + * @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 changelog along with {@link Response}. + */ + Response getChangeLogWithResponse(Context context); + + /** + * Get changelog. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog. + */ + Changelog getChangeLog(); + + /** + * support info for rulestack. + * + * @param email email address on behalf of which this API called. + * @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 support information for the resource along with {@link Response}. + */ + Response getSupportInfoWithResponse(String email, Context context); + + /** + * support info for rulestack. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource. + */ + SupportInfo getSupportInfo(); + + /** + * List of AppIds for LocalRulestack ApiVersion. + * + * @param appIdVersion The appIdVersion parameter. + * @param appPrefix The appPrefix parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 body along with {@link Response}. + */ + Response listAppIdsWithResponse( + String appIdVersion, String appPrefix, String skip, Integer top, Context context); + + /** + * List of AppIds for LocalRulestack ApiVersion. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ListAppIdResponse listAppIds(); + + /** + * List of countries for Rulestack. + * + * @param skip The skip parameter. + * @param top The top parameter. + * @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 countries Response Object along with {@link Response}. + */ + Response listCountriesWithResponse(String skip, Integer top, Context context); + + /** + * List of countries for Rulestack. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object. + */ + CountriesResponse listCountries(); + + /** + * List of Firewalls associated with Rulestack. + * + * @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 firewalls response along with {@link Response}. + */ + Response listFirewallsWithResponse(Context context); + + /** + * List of Firewalls associated with Rulestack. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response. + */ + ListFirewallsResponse listFirewalls(); + + /** + * List predefined URL categories for rulestack. + * + * @param skip The skip parameter. + * @param top The top parameter. + * @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 predefined url categories response along with {@link Response}. + */ + Response listPredefinedUrlCategoriesWithResponse( + String skip, Integer top, Context context); + + /** + * List predefined URL categories for rulestack. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response. + */ + PredefinedUrlCategoriesResponse listPredefinedUrlCategories(); + + /** + * Revert rulestack 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 {@link Response}. + */ + Response revertWithResponse(Context context); + + /** + * Revert rulestack 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. + */ + void revert(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResourceListResult.java new file mode 100644 index 000000000000..72ca33e47938 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LocalRulestackResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a LocalRulestackResource list operation. */ +@Fluent +public final class LocalRulestackResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of LocalRulestackResourceListResult class. */ + public LocalRulestackResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the LocalRulestackResourceListResult object itself. + */ + public LocalRulestackResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the LocalRulestackResourceListResult object itself. + */ + public LocalRulestackResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model LocalRulestackResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalRulestackResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResourceUpdate.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResourceUpdate.java new file mode 100644 index 000000000000..5b0370b6a1ef --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResourceUpdate.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The type used for update operations of the LocalRulestackResource. */ +@Fluent +public final class LocalRulestackResourceUpdate { + /* + * The managed service identities assigned to this resource. + */ + @JsonProperty(value = "identity") + private AzureResourceManagerManagedIdentityProperties identity; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The updatable properties of the LocalRulestackResource. + */ + @JsonProperty(value = "properties") + private LocalRulestackResourceUpdateProperties properties; + + /** Creates an instance of LocalRulestackResourceUpdate class. */ + public LocalRulestackResourceUpdate() { + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public AzureResourceManagerManagedIdentityProperties 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 LocalRulestackResourceUpdate object itself. + */ + public LocalRulestackResourceUpdate withIdentity(AzureResourceManagerManagedIdentityProperties identity) { + this.identity = identity; + return this; + } + + /** + * 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 LocalRulestackResourceUpdate object itself. + */ + public LocalRulestackResourceUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The updatable properties of the LocalRulestackResource. + * + * @return the properties value. + */ + public LocalRulestackResourceUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The updatable properties of the LocalRulestackResource. + * + * @param properties the properties value to set. + * @return the LocalRulestackResourceUpdate object itself. + */ + public LocalRulestackResourceUpdate withProperties(LocalRulestackResourceUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResourceUpdateProperties.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResourceUpdateProperties.java new file mode 100644 index 000000000000..8f8548e134a8 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestackResourceUpdateProperties.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The updatable properties of the LocalRulestackResource. */ +@Fluent +public final class LocalRulestackResourceUpdateProperties { + /* + * PanEtag info + */ + @JsonProperty(value = "panEtag") + private String panEtag; + + /* + * Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks + */ + @JsonProperty(value = "panLocation") + private String panLocation; + + /* + * Rulestack Type + */ + @JsonProperty(value = "scope") + private ScopeType scope; + + /* + * subscription scope of global rulestack + */ + @JsonProperty(value = "associatedSubscriptions") + private List associatedSubscriptions; + + /* + * rulestack description + */ + @JsonProperty(value = "description") + private String description; + + /* + * Mode for default rules creation + */ + @JsonProperty(value = "defaultMode") + private DefaultMode defaultMode; + + /* + * minimum version + */ + @JsonProperty(value = "minAppIdVersion") + private String minAppIdVersion; + + /* + * Security Profile + */ + @JsonProperty(value = "securityServices") + private SecurityServices securityServices; + + /** Creates an instance of LocalRulestackResourceUpdateProperties class. */ + public LocalRulestackResourceUpdateProperties() { + } + + /** + * Get the panEtag property: PanEtag info. + * + * @return the panEtag value. + */ + public String panEtag() { + return this.panEtag; + } + + /** + * Set the panEtag property: PanEtag info. + * + * @param panEtag the panEtag value to set. + * @return the LocalRulestackResourceUpdateProperties object itself. + */ + public LocalRulestackResourceUpdateProperties withPanEtag(String panEtag) { + this.panEtag = panEtag; + return this; + } + + /** + * Get the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * + * @return the panLocation value. + */ + public String panLocation() { + return this.panLocation; + } + + /** + * Set the panLocation property: Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks. + * + * @param panLocation the panLocation value to set. + * @return the LocalRulestackResourceUpdateProperties object itself. + */ + public LocalRulestackResourceUpdateProperties withPanLocation(String panLocation) { + this.panLocation = panLocation; + return this; + } + + /** + * Get the scope property: Rulestack Type. + * + * @return the scope value. + */ + public ScopeType scope() { + return this.scope; + } + + /** + * Set the scope property: Rulestack Type. + * + * @param scope the scope value to set. + * @return the LocalRulestackResourceUpdateProperties object itself. + */ + public LocalRulestackResourceUpdateProperties withScope(ScopeType scope) { + this.scope = scope; + return this; + } + + /** + * Get the associatedSubscriptions property: subscription scope of global rulestack. + * + * @return the associatedSubscriptions value. + */ + public List associatedSubscriptions() { + return this.associatedSubscriptions; + } + + /** + * Set the associatedSubscriptions property: subscription scope of global rulestack. + * + * @param associatedSubscriptions the associatedSubscriptions value to set. + * @return the LocalRulestackResourceUpdateProperties object itself. + */ + public LocalRulestackResourceUpdateProperties withAssociatedSubscriptions(List associatedSubscriptions) { + this.associatedSubscriptions = associatedSubscriptions; + return this; + } + + /** + * Get the description property: rulestack description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: rulestack description. + * + * @param description the description value to set. + * @return the LocalRulestackResourceUpdateProperties object itself. + */ + public LocalRulestackResourceUpdateProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the defaultMode property: Mode for default rules creation. + * + * @return the defaultMode value. + */ + public DefaultMode defaultMode() { + return this.defaultMode; + } + + /** + * Set the defaultMode property: Mode for default rules creation. + * + * @param defaultMode the defaultMode value to set. + * @return the LocalRulestackResourceUpdateProperties object itself. + */ + public LocalRulestackResourceUpdateProperties withDefaultMode(DefaultMode defaultMode) { + this.defaultMode = defaultMode; + return this; + } + + /** + * Get the minAppIdVersion property: minimum version. + * + * @return the minAppIdVersion value. + */ + public String minAppIdVersion() { + return this.minAppIdVersion; + } + + /** + * Set the minAppIdVersion property: minimum version. + * + * @param minAppIdVersion the minAppIdVersion value to set. + * @return the LocalRulestackResourceUpdateProperties object itself. + */ + public LocalRulestackResourceUpdateProperties withMinAppIdVersion(String minAppIdVersion) { + this.minAppIdVersion = minAppIdVersion; + return this; + } + + /** + * Get the securityServices property: Security Profile. + * + * @return the securityServices value. + */ + public SecurityServices securityServices() { + return this.securityServices; + } + + /** + * Set the securityServices property: Security Profile. + * + * @param securityServices the securityServices value to set. + * @return the LocalRulestackResourceUpdateProperties object itself. + */ + public LocalRulestackResourceUpdateProperties withSecurityServices(SecurityServices securityServices) { + this.securityServices = securityServices; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (securityServices() != null) { + securityServices().validate(); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestacks.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestacks.java new file mode 100644 index 000000000000..3cebe7793807 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LocalRulestacks.java @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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 LocalRulestacks. */ +public interface LocalRulestacks { + /** + * List LocalRulestackResource resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown 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 LocalRulestackResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List LocalRulestackResource resources by subscription 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 response of a LocalRulestackResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List LocalRulestackResource resources by 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 LocalRulestackResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List LocalRulestackResource resources by 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 LocalRulestackResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 LocalRulestackResource along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String localRulestackName, Context context); + + /** + * Get a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 LocalRulestackResource. + */ + LocalRulestackResource getByResourceGroup(String resourceGroupName, String localRulestackName); + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 localRulestackName); + + /** + * Delete a LocalRulestackResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 localRulestackName, Context context); + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 commit(String resourceGroupName, String localRulestackName); + + /** + * Commit rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 commit(String resourceGroupName, String localRulestackName, Context context); + + /** + * Get changelog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 changelog along with {@link Response}. + */ + Response getChangeLogWithResponse(String resourceGroupName, String localRulestackName, Context context); + + /** + * Get changelog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return changelog. + */ + Changelog getChangeLog(String resourceGroupName, String localRulestackName); + + /** + * support info for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param email email address on behalf of which this API called. + * @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 support information for the resource along with {@link Response}. + */ + Response getSupportInfoWithResponse( + String resourceGroupName, String localRulestackName, String email, Context context); + + /** + * support info for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return support information for the resource. + */ + SupportInfo getSupportInfo(String resourceGroupName, String localRulestackName); + + /** + * Get the list of advanced security objects. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 list of advanced security objects along with {@link Response}. + */ + Response listAdvancedSecurityObjectsWithResponse( + String resourceGroupName, + String localRulestackName, + AdvSecurityObjectTypeEnum type, + String skip, + Integer top, + Context context); + + /** + * Get the list of advanced security objects. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of advanced security objects. + */ + AdvSecurityObjectListResponse listAdvancedSecurityObjects( + String resourceGroupName, String localRulestackName, AdvSecurityObjectTypeEnum type); + + /** + * List of AppIds for LocalRulestack ApiVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param appIdVersion The appIdVersion parameter. + * @param appPrefix The appPrefix parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 body along with {@link Response}. + */ + Response listAppIdsWithResponse( + String resourceGroupName, + String localRulestackName, + String appIdVersion, + String appPrefix, + String skip, + Integer top, + Context context); + + /** + * List of AppIds for LocalRulestack ApiVersion. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ListAppIdResponse listAppIds(String resourceGroupName, String localRulestackName); + + /** + * List of countries for Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 countries Response Object along with {@link Response}. + */ + Response listCountriesWithResponse( + String resourceGroupName, String localRulestackName, String skip, Integer top, Context context); + + /** + * List of countries for Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return countries Response Object. + */ + CountriesResponse listCountries(String resourceGroupName, String localRulestackName); + + /** + * List of Firewalls associated with Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 firewalls response along with {@link Response}. + */ + Response listFirewallsWithResponse( + String resourceGroupName, String localRulestackName, Context context); + + /** + * List of Firewalls associated with Rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list firewalls response. + */ + ListFirewallsResponse listFirewalls(String resourceGroupName, String localRulestackName); + + /** + * List predefined URL categories for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 predefined url categories response along with {@link Response}. + */ + Response listPredefinedUrlCategoriesWithResponse( + String resourceGroupName, String localRulestackName, String skip, Integer top, Context context); + + /** + * List predefined URL categories for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return predefined url categories response. + */ + PredefinedUrlCategoriesResponse listPredefinedUrlCategories(String resourceGroupName, String localRulestackName); + + /** + * List the security services for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @param skip The skip parameter. + * @param top The top parameter. + * @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 security services list response along with {@link Response}. + */ + Response listSecurityServicesWithResponse( + String resourceGroupName, + String localRulestackName, + SecurityServicesTypeEnum type, + String skip, + Integer top, + Context context); + + /** + * List the security services for rulestack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param type The type parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security services list response. + */ + SecurityServicesResponse listSecurityServices( + String resourceGroupName, String localRulestackName, SecurityServicesTypeEnum type); + + /** + * Revert rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 Response}. + */ + Response revertWithResponse(String resourceGroupName, String localRulestackName, Context context); + + /** + * Revert rulestack configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 revert(String resourceGroupName, String localRulestackName); + + /** + * Get a LocalRulestackResource. + * + * @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 LocalRulestackResource along with {@link Response}. + */ + LocalRulestackResource getById(String id); + + /** + * Get a LocalRulestackResource. + * + * @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 LocalRulestackResource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a LocalRulestackResource. + * + * @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 a LocalRulestackResource. + * + * @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 LocalRulestackResource resource. + * + * @param name resource name. + * @return the first stage of the new LocalRulestackResource definition. + */ + LocalRulestackResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogDestination.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogDestination.java new file mode 100644 index 000000000000..9b62d16132dc --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogDestination.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Log Destination. */ +@Fluent +public final class LogDestination { + /* + * Storage account configurations + */ + @JsonProperty(value = "storageConfigurations") + private StorageAccount storageConfigurations; + + /* + * Event Hub configurations + */ + @JsonProperty(value = "eventHubConfigurations") + private EventHub eventHubConfigurations; + + /* + * Monitor Log configurations + */ + @JsonProperty(value = "monitorConfigurations") + private MonitorLog monitorConfigurations; + + /** Creates an instance of LogDestination class. */ + public LogDestination() { + } + + /** + * Get the storageConfigurations property: Storage account configurations. + * + * @return the storageConfigurations value. + */ + public StorageAccount storageConfigurations() { + return this.storageConfigurations; + } + + /** + * Set the storageConfigurations property: Storage account configurations. + * + * @param storageConfigurations the storageConfigurations value to set. + * @return the LogDestination object itself. + */ + public LogDestination withStorageConfigurations(StorageAccount storageConfigurations) { + this.storageConfigurations = storageConfigurations; + return this; + } + + /** + * Get the eventHubConfigurations property: Event Hub configurations. + * + * @return the eventHubConfigurations value. + */ + public EventHub eventHubConfigurations() { + return this.eventHubConfigurations; + } + + /** + * Set the eventHubConfigurations property: Event Hub configurations. + * + * @param eventHubConfigurations the eventHubConfigurations value to set. + * @return the LogDestination object itself. + */ + public LogDestination withEventHubConfigurations(EventHub eventHubConfigurations) { + this.eventHubConfigurations = eventHubConfigurations; + return this; + } + + /** + * Get the monitorConfigurations property: Monitor Log configurations. + * + * @return the monitorConfigurations value. + */ + public MonitorLog monitorConfigurations() { + return this.monitorConfigurations; + } + + /** + * Set the monitorConfigurations property: Monitor Log configurations. + * + * @param monitorConfigurations the monitorConfigurations value to set. + * @return the LogDestination object itself. + */ + public LogDestination withMonitorConfigurations(MonitorLog monitorConfigurations) { + this.monitorConfigurations = monitorConfigurations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageConfigurations() != null) { + storageConfigurations().validate(); + } + if (eventHubConfigurations() != null) { + eventHubConfigurations().validate(); + } + if (monitorConfigurations() != null) { + monitorConfigurations().validate(); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogOption.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogOption.java new file mode 100644 index 000000000000..57e4a5818d4b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogOption.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Log options possible. */ +public final class LogOption extends ExpandableStringEnum { + /** Static value SAME_DESTINATION for LogOption. */ + public static final LogOption SAME_DESTINATION = fromString("SAME_DESTINATION"); + + /** Static value INDIVIDUAL_DESTINATION for LogOption. */ + public static final LogOption INDIVIDUAL_DESTINATION = fromString("INDIVIDUAL_DESTINATION"); + + /** + * Creates a new instance of LogOption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LogOption() { + } + + /** + * Creates or finds a LogOption from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogOption. + */ + @JsonCreator + public static LogOption fromString(String name) { + return fromString(name, LogOption.class); + } + + /** + * Gets known LogOption values. + * + * @return known LogOption values. + */ + public static Collection values() { + return values(LogOption.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogSettings.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogSettings.java new file mode 100644 index 000000000000..94e1bf399355 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogSettings.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LogSettingsInner; + +/** An immutable client-side representation of LogSettings. */ +public interface LogSettings { + /** + * Gets the logType property: One of possible log type. + * + * @return the logType value. + */ + LogType logType(); + + /** + * Gets the logOption property: Log option SAME/INDIVIDUAL. + * + * @return the logOption value. + */ + LogOption logOption(); + + /** + * Gets the applicationInsights property: Application Insight details. + * + * @return the applicationInsights value. + */ + ApplicationInsights applicationInsights(); + + /** + * Gets the commonDestination property: Common destination configurations. + * + * @return the commonDestination value. + */ + LogDestination commonDestination(); + + /** + * Gets the trafficLogDestination property: Traffic destination configurations. + * + * @return the trafficLogDestination value. + */ + LogDestination trafficLogDestination(); + + /** + * Gets the threatLogDestination property: Threat destination configurations. + * + * @return the threatLogDestination value. + */ + LogDestination threatLogDestination(); + + /** + * Gets the decryptLogDestination property: Decrypt destination configurations. + * + * @return the decryptLogDestination value. + */ + LogDestination decryptLogDestination(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.LogSettingsInner object. + * + * @return the inner object. + */ + LogSettingsInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogType.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogType.java new file mode 100644 index 000000000000..65d6e9c725eb --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/LogType.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Possible log types. */ +public final class LogType extends ExpandableStringEnum { + /** Static value TRAFFIC for LogType. */ + public static final LogType TRAFFIC = fromString("TRAFFIC"); + + /** Static value THREAT for LogType. */ + public static final LogType THREAT = fromString("THREAT"); + + /** Static value DECRYPTION for LogType. */ + public static final LogType DECRYPTION = fromString("DECRYPTION"); + + /** Static value WILDFIRE for LogType. */ + public static final LogType WILDFIRE = fromString("WILDFIRE"); + + /** Static value DLP for LogType. */ + public static final LogType DLP = fromString("DLP"); + + /** Static value AUDIT for LogType. */ + public static final LogType AUDIT = fromString("AUDIT"); + + /** + * Creates a new instance of LogType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LogType() { + } + + /** + * Creates or finds a LogType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogType. + */ + @JsonCreator + public static LogType fromString(String name) { + return fromString(name, LogType.class); + } + + /** + * Gets known LogType values. + * + * @return known LogType values. + */ + public static Collection values() { + return values(LogType.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ManagedIdentityType.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ManagedIdentityType.java new file mode 100644 index 000000000000..53fba656d090 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ManagedIdentityType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The kind of managed identity assigned to this resource. */ +public final class ManagedIdentityType extends ExpandableStringEnum { + /** Static value None for ManagedIdentityType. */ + public static final ManagedIdentityType NONE = fromString("None"); + + /** Static value SystemAssigned for ManagedIdentityType. */ + public static final ManagedIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** Static value UserAssigned for ManagedIdentityType. */ + public static final ManagedIdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** Static value SystemAssigned,UserAssigned for ManagedIdentityType. */ + public static final ManagedIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = fromString("SystemAssigned,UserAssigned"); + + /** + * Creates a new instance of ManagedIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedIdentityType() { + } + + /** + * Creates or finds a ManagedIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedIdentityType. + */ + @JsonCreator + public static ManagedIdentityType fromString(String name) { + return fromString(name, ManagedIdentityType.class); + } + + /** + * Gets known ManagedIdentityType values. + * + * @return known ManagedIdentityType values. + */ + public static Collection values() { + return values(ManagedIdentityType.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/MarketplaceDetails.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/MarketplaceDetails.java new file mode 100644 index 000000000000..779a6aa1fca5 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/MarketplaceDetails.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** MarketplaceDetails of PAN Firewall resource. */ +@Fluent +public final class MarketplaceDetails { + /* + * Marketplace Subscription Id + */ + @JsonProperty(value = "marketplaceSubscriptionId", access = JsonProperty.Access.WRITE_ONLY) + private String marketplaceSubscriptionId; + + /* + * Offer Id + */ + @JsonProperty(value = "offerId", required = true) + private String offerId; + + /* + * Publisher Id + */ + @JsonProperty(value = "publisherId", required = true) + private String publisherId; + + /* + * Marketplace Subscription Status + */ + @JsonProperty(value = "marketplaceSubscriptionStatus") + private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus; + + /** Creates an instance of MarketplaceDetails class. */ + public MarketplaceDetails() { + } + + /** + * Get the marketplaceSubscriptionId property: Marketplace Subscription Id. + * + * @return the marketplaceSubscriptionId value. + */ + public String marketplaceSubscriptionId() { + return this.marketplaceSubscriptionId; + } + + /** + * Get the offerId property: Offer Id. + * + * @return the offerId value. + */ + public String offerId() { + return this.offerId; + } + + /** + * Set the offerId property: Offer Id. + * + * @param offerId the offerId value to set. + * @return the MarketplaceDetails object itself. + */ + public MarketplaceDetails withOfferId(String offerId) { + this.offerId = offerId; + return this; + } + + /** + * Get the publisherId property: Publisher Id. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.publisherId; + } + + /** + * Set the publisherId property: Publisher Id. + * + * @param publisherId the publisherId value to set. + * @return the MarketplaceDetails object itself. + */ + public MarketplaceDetails withPublisherId(String publisherId) { + this.publisherId = publisherId; + return this; + } + + /** + * Get the marketplaceSubscriptionStatus property: Marketplace Subscription Status. + * + * @return the marketplaceSubscriptionStatus value. + */ + public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { + return this.marketplaceSubscriptionStatus; + } + + /** + * Set the marketplaceSubscriptionStatus property: Marketplace Subscription Status. + * + * @param marketplaceSubscriptionStatus the marketplaceSubscriptionStatus value to set. + * @return the MarketplaceDetails object itself. + */ + public MarketplaceDetails withMarketplaceSubscriptionStatus( + MarketplaceSubscriptionStatus marketplaceSubscriptionStatus) { + this.marketplaceSubscriptionStatus = marketplaceSubscriptionStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (offerId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property offerId in model MarketplaceDetails")); + } + if (publisherId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property publisherId in model MarketplaceDetails")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MarketplaceDetails.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/MarketplaceSubscriptionStatus.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/MarketplaceSubscriptionStatus.java new file mode 100644 index 000000000000..dee92e640109 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/MarketplaceSubscriptionStatus.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Marketplace Subscription Status. */ +public final class MarketplaceSubscriptionStatus extends ExpandableStringEnum { + /** Static value PendingFulfillmentStart for MarketplaceSubscriptionStatus. */ + public static final MarketplaceSubscriptionStatus PENDING_FULFILLMENT_START = fromString("PendingFulfillmentStart"); + + /** Static value Subscribed for MarketplaceSubscriptionStatus. */ + public static final MarketplaceSubscriptionStatus SUBSCRIBED = fromString("Subscribed"); + + /** Static value Suspended for MarketplaceSubscriptionStatus. */ + public static final MarketplaceSubscriptionStatus SUSPENDED = fromString("Suspended"); + + /** Static value Unsubscribed for MarketplaceSubscriptionStatus. */ + public static final MarketplaceSubscriptionStatus UNSUBSCRIBED = fromString("Unsubscribed"); + + /** Static value NotStarted for MarketplaceSubscriptionStatus. */ + public static final MarketplaceSubscriptionStatus NOT_STARTED = fromString("NotStarted"); + + /** Static value FulfillmentRequested for MarketplaceSubscriptionStatus. */ + public static final MarketplaceSubscriptionStatus FULFILLMENT_REQUESTED = fromString("FulfillmentRequested"); + + /** + * Creates a new instance of MarketplaceSubscriptionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MarketplaceSubscriptionStatus() { + } + + /** + * Creates or finds a MarketplaceSubscriptionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding MarketplaceSubscriptionStatus. + */ + @JsonCreator + public static MarketplaceSubscriptionStatus fromString(String name) { + return fromString(name, MarketplaceSubscriptionStatus.class); + } + + /** + * Gets known MarketplaceSubscriptionStatus values. + * + * @return known MarketplaceSubscriptionStatus values. + */ + public static Collection values() { + return values(MarketplaceSubscriptionStatus.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/MonitorLog.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/MonitorLog.java new file mode 100644 index 000000000000..88b49e0f9aaa --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/MonitorLog.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** MonitorLog configurations. */ +@Fluent +public final class MonitorLog { + /* + * Resource ID of MonitorLog + */ + @JsonProperty(value = "id") + private String id; + + /* + * Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * MonitorLog workspace + */ + @JsonProperty(value = "workspace") + private String workspace; + + /* + * Primary Key value for Monitor + */ + @JsonProperty(value = "primaryKey") + private String primaryKey; + + /* + * Secondary Key value for Monitor + */ + @JsonProperty(value = "secondaryKey") + private String secondaryKey; + + /** Creates an instance of MonitorLog class. */ + public MonitorLog() { + } + + /** + * Get the id property: Resource ID of MonitorLog. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID of MonitorLog. + * + * @param id the id value to set. + * @return the MonitorLog object itself. + */ + public MonitorLog withId(String id) { + this.id = id; + return this; + } + + /** + * Get the subscriptionId property: Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the MonitorLog object itself. + */ + public MonitorLog withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the workspace property: MonitorLog workspace. + * + * @return the workspace value. + */ + public String workspace() { + return this.workspace; + } + + /** + * Set the workspace property: MonitorLog workspace. + * + * @param workspace the workspace value to set. + * @return the MonitorLog object itself. + */ + public MonitorLog withWorkspace(String workspace) { + this.workspace = workspace; + return this; + } + + /** + * Get the primaryKey property: Primary Key value for Monitor. + * + * @return the primaryKey value. + */ + public String primaryKey() { + return this.primaryKey; + } + + /** + * Set the primaryKey property: Primary Key value for Monitor. + * + * @param primaryKey the primaryKey value to set. + * @return the MonitorLog object itself. + */ + public MonitorLog withPrimaryKey(String primaryKey) { + this.primaryKey = primaryKey; + return this; + } + + /** + * Get the secondaryKey property: Secondary Key value for Monitor. + * + * @return the secondaryKey value. + */ + public String secondaryKey() { + return this.secondaryKey; + } + + /** + * Set the secondaryKey property: Secondary Key value for Monitor. + * + * @param secondaryKey the secondaryKey value to set. + * @return the MonitorLog object itself. + */ + public MonitorLog withSecondaryKey(String secondaryKey) { + this.secondaryKey = secondaryKey; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/NameDescriptionObject.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/NameDescriptionObject.java new file mode 100644 index 000000000000..83199e31ed26 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/NameDescriptionObject.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** object type info. */ +@Fluent +public final class NameDescriptionObject { + /* + * name value + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * description value + */ + @JsonProperty(value = "description") + private String description; + + /** Creates an instance of NameDescriptionObject class. */ + public NameDescriptionObject() { + } + + /** + * Get the name property: name value. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: name value. + * + * @param name the name value to set. + * @return the NameDescriptionObject object itself. + */ + public NameDescriptionObject withName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: description value. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: description value. + * + * @param description the description value to set. + * @return the NameDescriptionObject object itself. + */ + public NameDescriptionObject withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model NameDescriptionObject")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NameDescriptionObject.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/NetworkProfile.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/NetworkProfile.java new file mode 100644 index 000000000000..1079d3feb55d --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/NetworkProfile.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Network settings for Firewall. */ +@Fluent +public final class NetworkProfile { + /* + * Vnet configurations + */ + @JsonProperty(value = "vnetConfiguration") + private VnetConfiguration vnetConfiguration; + + /* + * Vwan configurations + */ + @JsonProperty(value = "vwanConfiguration") + private VwanConfiguration vwanConfiguration; + + /* + * vnet or vwan, cannot be updated + */ + @JsonProperty(value = "networkType", required = true) + private NetworkType networkType; + + /* + * List of IPs associated with the Firewall + */ + @JsonProperty(value = "publicIps", required = true) + private List publicIps; + + /* + * Enable egress NAT, enabled by default + */ + @JsonProperty(value = "enableEgressNat", required = true) + private EgressNat enableEgressNat; + + /* + * Egress nat IP to use + */ + @JsonProperty(value = "egressNatIp") + private List egressNatIp; + + /** Creates an instance of NetworkProfile class. */ + public NetworkProfile() { + } + + /** + * Get the vnetConfiguration property: Vnet configurations. + * + * @return the vnetConfiguration value. + */ + public VnetConfiguration vnetConfiguration() { + return this.vnetConfiguration; + } + + /** + * Set the vnetConfiguration property: Vnet configurations. + * + * @param vnetConfiguration the vnetConfiguration value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withVnetConfiguration(VnetConfiguration vnetConfiguration) { + this.vnetConfiguration = vnetConfiguration; + return this; + } + + /** + * Get the vwanConfiguration property: Vwan configurations. + * + * @return the vwanConfiguration value. + */ + public VwanConfiguration vwanConfiguration() { + return this.vwanConfiguration; + } + + /** + * Set the vwanConfiguration property: Vwan configurations. + * + * @param vwanConfiguration the vwanConfiguration value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withVwanConfiguration(VwanConfiguration vwanConfiguration) { + this.vwanConfiguration = vwanConfiguration; + return this; + } + + /** + * Get the networkType property: vnet or vwan, cannot be updated. + * + * @return the networkType value. + */ + public NetworkType networkType() { + return this.networkType; + } + + /** + * Set the networkType property: vnet or vwan, cannot be updated. + * + * @param networkType the networkType value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withNetworkType(NetworkType networkType) { + this.networkType = networkType; + return this; + } + + /** + * Get the publicIps property: List of IPs associated with the Firewall. + * + * @return the publicIps value. + */ + public List publicIps() { + return this.publicIps; + } + + /** + * Set the publicIps property: List of IPs associated with the Firewall. + * + * @param publicIps the publicIps value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withPublicIps(List publicIps) { + this.publicIps = publicIps; + return this; + } + + /** + * Get the enableEgressNat property: Enable egress NAT, enabled by default. + * + * @return the enableEgressNat value. + */ + public EgressNat enableEgressNat() { + return this.enableEgressNat; + } + + /** + * Set the enableEgressNat property: Enable egress NAT, enabled by default. + * + * @param enableEgressNat the enableEgressNat value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withEnableEgressNat(EgressNat enableEgressNat) { + this.enableEgressNat = enableEgressNat; + return this; + } + + /** + * Get the egressNatIp property: Egress nat IP to use. + * + * @return the egressNatIp value. + */ + public List egressNatIp() { + return this.egressNatIp; + } + + /** + * Set the egressNatIp property: Egress nat IP to use. + * + * @param egressNatIp the egressNatIp value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withEgressNatIp(List egressNatIp) { + this.egressNatIp = egressNatIp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vnetConfiguration() != null) { + vnetConfiguration().validate(); + } + if (vwanConfiguration() != null) { + vwanConfiguration().validate(); + } + if (networkType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property networkType in model NetworkProfile")); + } + if (publicIps() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property publicIps in model NetworkProfile")); + } else { + publicIps().forEach(e -> e.validate()); + } + if (enableEgressNat() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property enableEgressNat in model NetworkProfile")); + } + if (egressNatIp() != null) { + egressNatIp().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkProfile.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/NetworkType.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/NetworkType.java new file mode 100644 index 000000000000..785ba2c82025 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/NetworkType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** NetworkType Enum. */ +public final class NetworkType extends ExpandableStringEnum { + /** Static value VNET for NetworkType. */ + public static final NetworkType VNET = fromString("VNET"); + + /** Static value VWAN for NetworkType. */ + public static final NetworkType VWAN = fromString("VWAN"); + + /** + * Creates a new instance of NetworkType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkType() { + } + + /** + * Creates or finds a NetworkType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkType. + */ + @JsonCreator + public static NetworkType fromString(String name) { + return fromString(name, NetworkType.class); + } + + /** + * Gets known NetworkType values. + * + * @return known NetworkType values. + */ + public static Collection values() { + return values(NetworkType.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Operation.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Operation.java new file mode 100644 index 000000000000..900d9ef584fd --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Operation.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.OperationInner; + +/** An immutable client-side representation of Operation. */ +public interface Operation { + /** + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + String name(); + + /** + * 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. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + OperationDisplay display(); + + /** + * Gets 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". + * + * @return the origin value. + */ + Origin origin(); + + /** + * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + ActionType actionType(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.OperationInner object. + * + * @return the inner object. + */ + OperationInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/OperationDisplay.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/OperationDisplay.java new file mode 100644 index 000000000000..ccab5b070912 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/OperationDisplay.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Localized display information for this particular operation. */ +@Immutable +public final class OperationDisplay { + /* + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + * Compute". + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /* + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + * Schedule Collections". + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /* + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + * Machine", "Restart Virtual Machine". + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /* + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + + /** + * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. + * "Virtual Machines" or "Job Schedule Collections". + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Get the description property: The short, localized friendly description of the operation; suitable for tool tips + * and detailed views. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/OperationListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/OperationListResult.java new file mode 100644 index 000000000000..b70aeea72e54 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/OperationListResult.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.OperationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. + */ +@Immutable +public final class OperationListResult { + /* + * List of operations supported by the resource provider + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of operation list results (if there are any). + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of OperationListResult class. */ + public OperationListResult() { + } + + /** + * Get the value property: List of operations supported by the resource provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * + * @return the nextLink value. + */ + 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()); + } + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Operations.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Operations.java new file mode 100644 index 000000000000..ab1433407789 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Operations.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of Operations. */ +public interface 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. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Origin.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Origin.java new file mode 100644 index 000000000000..e15ff9e03719 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/Origin.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ +public final class Origin extends ExpandableStringEnum { + /** Static value user for Origin. */ + public static final Origin USER = fromString("user"); + + /** Static value system for Origin. */ + public static final Origin SYSTEM = fromString("system"); + + /** Static value user,system for Origin. */ + public static final Origin USER_SYSTEM = fromString("user,system"); + + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + + /** + * Creates or finds a Origin from its string representation. + * + * @param name a name to look for. + * @return the corresponding Origin. + */ + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** + * Gets known Origin values. + * + * @return known Origin values. + */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PanoramaConfig.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PanoramaConfig.java new file mode 100644 index 000000000000..b5667df840c5 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PanoramaConfig.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Panorama Config. */ +@Fluent +public final class PanoramaConfig { + /* + * Base64 encoded string representing Panorama parameters to be used by Firewall to connect to Panorama. This + * string is generated via azure plugin in Panorama + */ + @JsonProperty(value = "configString", required = true) + private String configString; + + /* + * VM auth key for panorama connectivity + */ + @JsonProperty(value = "vmAuthKey", access = JsonProperty.Access.WRITE_ONLY) + private String vmAuthKey; + + /* + * Primary Panorama Server IP address value in dotted format for IPv4 + */ + @JsonProperty(value = "panoramaServer", access = JsonProperty.Access.WRITE_ONLY) + private String panoramaServer; + + /* + * Secondary Panorama Server IP address value in dotted format for IPv4 + */ + @JsonProperty(value = "panoramaServer2", access = JsonProperty.Access.WRITE_ONLY) + private String panoramaServer2; + + /* + * Panorama Device Group to join + */ + @JsonProperty(value = "dgName", access = JsonProperty.Access.WRITE_ONLY) + private String dgName; + + /* + * Panorama Template Stack to join - (Once configured we can not edit the value) + */ + @JsonProperty(value = "tplName", access = JsonProperty.Access.WRITE_ONLY) + private String tplName; + + /* + * Panorama Collector Group to join - (Once configured we can not edit the value) + */ + @JsonProperty(value = "cgName", access = JsonProperty.Access.WRITE_ONLY) + private String cgName; + + /* + * Resource name(may be unique) for PN admin + */ + @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) + private String hostname; + + /** Creates an instance of PanoramaConfig class. */ + public PanoramaConfig() { + } + + /** + * Get the configString property: Base64 encoded string representing Panorama parameters to be used by Firewall to + * connect to Panorama. This string is generated via azure plugin in Panorama. + * + * @return the configString value. + */ + public String configString() { + return this.configString; + } + + /** + * Set the configString property: Base64 encoded string representing Panorama parameters to be used by Firewall to + * connect to Panorama. This string is generated via azure plugin in Panorama. + * + * @param configString the configString value to set. + * @return the PanoramaConfig object itself. + */ + public PanoramaConfig withConfigString(String configString) { + this.configString = configString; + return this; + } + + /** + * Get the vmAuthKey property: VM auth key for panorama connectivity. + * + * @return the vmAuthKey value. + */ + public String vmAuthKey() { + return this.vmAuthKey; + } + + /** + * Get the panoramaServer property: Primary Panorama Server IP address value in dotted format for IPv4. + * + * @return the panoramaServer value. + */ + public String panoramaServer() { + return this.panoramaServer; + } + + /** + * Get the panoramaServer2 property: Secondary Panorama Server IP address value in dotted format for IPv4. + * + * @return the panoramaServer2 value. + */ + public String panoramaServer2() { + return this.panoramaServer2; + } + + /** + * Get the dgName property: Panorama Device Group to join. + * + * @return the dgName value. + */ + public String dgName() { + return this.dgName; + } + + /** + * Get the tplName property: Panorama Template Stack to join - (Once configured we can not edit the value). + * + * @return the tplName value. + */ + public String tplName() { + return this.tplName; + } + + /** + * Get the cgName property: Panorama Collector Group to join - (Once configured we can not edit the value). + * + * @return the cgName value. + */ + public String cgName() { + return this.cgName; + } + + /** + * Get the hostname property: Resource name(may be unique) for PN admin. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (configString() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property configString in model PanoramaConfig")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PanoramaConfig.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PanoramaStatus.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PanoramaStatus.java new file mode 100644 index 000000000000..9492f9052590 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PanoramaStatus.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Panorama connectivity information. */ +@Immutable +public final class PanoramaStatus { + /* + * Primary Panorama connection status + */ + @JsonProperty(value = "panoramaServerStatus", access = JsonProperty.Access.WRITE_ONLY) + private ServerStatus panoramaServerStatus; + + /* + * Secondary Panorama connection status + */ + @JsonProperty(value = "panoramaServer2Status", access = JsonProperty.Access.WRITE_ONLY) + private ServerStatus panoramaServer2Status; + + /** Creates an instance of PanoramaStatus class. */ + public PanoramaStatus() { + } + + /** + * Get the panoramaServerStatus property: Primary Panorama connection status. + * + * @return the panoramaServerStatus value. + */ + public ServerStatus panoramaServerStatus() { + return this.panoramaServerStatus; + } + + /** + * Get the panoramaServer2Status property: Secondary Panorama connection status. + * + * @return the panoramaServer2Status value. + */ + public ServerStatus panoramaServer2Status() { + return this.panoramaServer2Status; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PlanData.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PlanData.java new file mode 100644 index 000000000000..a75ab2487a35 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PlanData.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Billing plan information. */ +@Fluent +public final class PlanData { + /* + * different usage type like PAYG/COMMITTED + */ + @JsonProperty(value = "usageType") + private UsageType usageType; + + /* + * different billing cycles like MONTHLY/WEEKLY + */ + @JsonProperty(value = "billingCycle", required = true) + private BillingCycle billingCycle; + + /* + * plan id as published by Liftr.PAN + */ + @JsonProperty(value = "planId", required = true) + private String planId; + + /* + * date when plan was applied + */ + @JsonProperty(value = "effectiveDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime effectiveDate; + + /** Creates an instance of PlanData class. */ + public PlanData() { + } + + /** + * Get the usageType property: different usage type like PAYG/COMMITTED. + * + * @return the usageType value. + */ + public UsageType usageType() { + return this.usageType; + } + + /** + * Set the usageType property: different usage type like PAYG/COMMITTED. + * + * @param usageType the usageType value to set. + * @return the PlanData object itself. + */ + public PlanData withUsageType(UsageType usageType) { + this.usageType = usageType; + return this; + } + + /** + * Get the billingCycle property: different billing cycles like MONTHLY/WEEKLY. + * + * @return the billingCycle value. + */ + public BillingCycle billingCycle() { + return this.billingCycle; + } + + /** + * Set the billingCycle property: different billing cycles like MONTHLY/WEEKLY. + * + * @param billingCycle the billingCycle value to set. + * @return the PlanData object itself. + */ + public PlanData withBillingCycle(BillingCycle billingCycle) { + this.billingCycle = billingCycle; + return this; + } + + /** + * Get the planId property: plan id as published by Liftr.PAN. + * + * @return the planId value. + */ + public String planId() { + return this.planId; + } + + /** + * Set the planId property: plan id as published by Liftr.PAN. + * + * @param planId the planId value to set. + * @return the PlanData object itself. + */ + public PlanData withPlanId(String planId) { + this.planId = planId; + return this; + } + + /** + * Get the effectiveDate property: date when plan was applied. + * + * @return the effectiveDate value. + */ + public OffsetDateTime effectiveDate() { + return this.effectiveDate; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (billingCycle() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property billingCycle in model PlanData")); + } + if (planId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property planId in model PlanData")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PlanData.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PostRules.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PostRules.java new file mode 100644 index 000000000000..2e179c24d51e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PostRules.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PostRulesResourceInner; + +/** Resource collection API of PostRules. */ +public interface PostRules { + /** + * List PostRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 PostRulesResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String globalRulestackName); + + /** + * List PostRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 PostRulesResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String globalRulestackName, Context context); + + /** + * Get a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @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 PostRulesResource along with {@link Response}. + */ + Response getWithResponse(String globalRulestackName, String priority, Context context); + + /** + * Get a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 PostRulesResource. + */ + PostRulesResource get(String globalRulestackName, String priority); + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list. + */ + PostRulesResource createOrUpdate(String globalRulestackName, String priority, PostRulesResourceInner resource); + + /** + * Create a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param resource 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 postRulestack rule list. + */ + PostRulesResource createOrUpdate( + String globalRulestackName, String priority, PostRulesResourceInner resource, Context context); + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 globalRulestackName, String priority); + + /** + * Delete a PostRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @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 globalRulestackName, String priority, Context context); + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @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 counters along with {@link Response}. + */ + Response getCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context); + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters. + */ + RuleCounter getCounters(String globalRulestackName, String priority); + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @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 Response}. + */ + Response refreshCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context); + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 refreshCounters(String globalRulestackName, String priority); + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @param firewallName The firewallName parameter. + * @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 rule counter reset along with {@link Response}. + */ + Response resetCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context); + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Post Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset. + */ + RuleCounterReset resetCounters(String globalRulestackName, String priority); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PostRulesResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PostRulesResource.java new file mode 100644 index 000000000000..0eb92b68035c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PostRulesResource.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PostRulesResourceInner; +import java.util.List; + +/** An immutable client-side representation of PostRulesResource. */ +public interface PostRulesResource { + /** + * 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 etag property: etag info. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the ruleName property: rule name. + * + * @return the ruleName value. + */ + String ruleName(); + + /** + * Gets the priority property: The priority property. + * + * @return the priority value. + */ + Integer priority(); + + /** + * Gets the description property: rule description. + * + * @return the description value. + */ + String description(); + + /** + * Gets the ruleState property: state of this rule. + * + * @return the ruleState value. + */ + StateEnum ruleState(); + + /** + * Gets the source property: source address. + * + * @return the source value. + */ + SourceAddr source(); + + /** + * Gets the negateSource property: cidr should not be 'any'. + * + * @return the negateSource value. + */ + BooleanEnum negateSource(); + + /** + * Gets the destination property: destination address. + * + * @return the destination value. + */ + DestinationAddr destination(); + + /** + * Gets the negateDestination property: cidr should not be 'any'. + * + * @return the negateDestination value. + */ + BooleanEnum negateDestination(); + + /** + * Gets the applications property: array of rule applications. + * + * @return the applications value. + */ + List applications(); + + /** + * Gets the category property: rule category. + * + * @return the category value. + */ + Category category(); + + /** + * Gets the protocol property: any, application-default, TCP:number, UDP:number. + * + * @return the protocol value. + */ + String protocol(); + + /** + * Gets the protocolPortList property: prot port list. + * + * @return the protocolPortList value. + */ + List protocolPortList(); + + /** + * Gets the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @return the inboundInspectionCertificate value. + */ + String inboundInspectionCertificate(); + + /** + * Gets the auditComment property: rule comment. + * + * @return the auditComment value. + */ + String auditComment(); + + /** + * Gets the actionType property: rule action. + * + * @return the actionType value. + */ + ActionEnum actionType(); + + /** + * Gets the enableLogging property: enable or disable logging. + * + * @return the enableLogging value. + */ + StateEnum enableLogging(); + + /** + * Gets the decryptionRuleType property: enable or disable decryption. + * + * @return the decryptionRuleType value. + */ + DecryptionRuleTypeEnum decryptionRuleType(); + + /** + * Gets the tags property: tag for rule. + * + * @return the tags value. + */ + List tags(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.PostRulesResourceInner object. + * + * @return the inner object. + */ + PostRulesResourceInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PostRulesResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PostRulesResourceListResult.java new file mode 100644 index 000000000000..7f76a2dfe0a5 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PostRulesResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PostRulesResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a PostRulesResource list operation. */ +@Fluent +public final class PostRulesResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of PostRulesResourceListResult class. */ + public PostRulesResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the PostRulesResourceListResult object itself. + */ + public PostRulesResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the PostRulesResourceListResult object itself. + */ + public PostRulesResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model PostRulesResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PostRulesResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PreRules.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PreRules.java new file mode 100644 index 000000000000..14cae55c8ab3 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PreRules.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PreRulesResourceInner; + +/** Resource collection API of PreRules. */ +public interface PreRules { + /** + * List PreRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 PreRulesResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String globalRulestackName); + + /** + * List PreRulesResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 PreRulesResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String globalRulestackName, Context context); + + /** + * Get a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @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 PreRulesResource along with {@link Response}. + */ + Response getWithResponse(String globalRulestackName, String priority, Context context); + + /** + * Get a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 PreRulesResource. + */ + PreRulesResource get(String globalRulestackName, String priority); + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list. + */ + PreRulesResource createOrUpdate(String globalRulestackName, String priority, PreRulesResourceInner resource); + + /** + * Create a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param resource 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 preRulestack rule list. + */ + PreRulesResource createOrUpdate( + String globalRulestackName, String priority, PreRulesResourceInner resource, Context context); + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 globalRulestackName, String priority); + + /** + * Delete a PreRulesResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @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 globalRulestackName, String priority, Context context); + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @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 counters along with {@link Response}. + */ + Response getCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context); + + /** + * Get counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return counters. + */ + RuleCounter getCounters(String globalRulestackName, String priority); + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @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 Response}. + */ + Response refreshCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context); + + /** + * Refresh counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 refreshCounters(String globalRulestackName, String priority); + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @param firewallName The firewallName parameter. + * @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 rule counter reset along with {@link Response}. + */ + Response resetCountersWithResponse( + String globalRulestackName, String priority, String firewallName, Context context); + + /** + * Reset counters. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param priority Pre Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return rule counter reset. + */ + RuleCounterReset resetCounters(String globalRulestackName, String priority); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PreRulesResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PreRulesResource.java new file mode 100644 index 000000000000..65bee03f28f7 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PreRulesResource.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PreRulesResourceInner; +import java.util.List; + +/** An immutable client-side representation of PreRulesResource. */ +public interface PreRulesResource { + /** + * 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 etag property: etag info. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the ruleName property: rule name. + * + * @return the ruleName value. + */ + String ruleName(); + + /** + * Gets the priority property: The priority property. + * + * @return the priority value. + */ + Integer priority(); + + /** + * Gets the description property: rule description. + * + * @return the description value. + */ + String description(); + + /** + * Gets the ruleState property: state of this rule. + * + * @return the ruleState value. + */ + StateEnum ruleState(); + + /** + * Gets the source property: source address. + * + * @return the source value. + */ + SourceAddr source(); + + /** + * Gets the negateSource property: cidr should not be 'any'. + * + * @return the negateSource value. + */ + BooleanEnum negateSource(); + + /** + * Gets the destination property: destination address. + * + * @return the destination value. + */ + DestinationAddr destination(); + + /** + * Gets the negateDestination property: cidr should not be 'any'. + * + * @return the negateDestination value. + */ + BooleanEnum negateDestination(); + + /** + * Gets the applications property: array of rule applications. + * + * @return the applications value. + */ + List applications(); + + /** + * Gets the category property: rule category. + * + * @return the category value. + */ + Category category(); + + /** + * Gets the protocol property: any, application-default, TCP:number, UDP:number. + * + * @return the protocol value. + */ + String protocol(); + + /** + * Gets the protocolPortList property: prot port list. + * + * @return the protocolPortList value. + */ + List protocolPortList(); + + /** + * Gets the inboundInspectionCertificate property: inbound Inspection Certificate. + * + * @return the inboundInspectionCertificate value. + */ + String inboundInspectionCertificate(); + + /** + * Gets the auditComment property: rule comment. + * + * @return the auditComment value. + */ + String auditComment(); + + /** + * Gets the actionType property: rule action. + * + * @return the actionType value. + */ + ActionEnum actionType(); + + /** + * Gets the enableLogging property: enable or disable logging. + * + * @return the enableLogging value. + */ + StateEnum enableLogging(); + + /** + * Gets the decryptionRuleType property: enable or disable decryption. + * + * @return the decryptionRuleType value. + */ + DecryptionRuleTypeEnum decryptionRuleType(); + + /** + * Gets the tags property: tag for rule. + * + * @return the tags value. + */ + List tags(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.PreRulesResourceInner object. + * + * @return the inner object. + */ + PreRulesResourceInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PreRulesResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PreRulesResourceListResult.java new file mode 100644 index 000000000000..76f012f5893f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PreRulesResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PreRulesResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a PreRulesResource list operation. */ +@Fluent +public final class PreRulesResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of PreRulesResourceListResult class. */ + public PreRulesResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the PreRulesResourceListResult object itself. + */ + public PreRulesResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the PreRulesResourceListResult object itself. + */ + public PreRulesResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model PreRulesResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PreRulesResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PredefinedUrlCategoriesResponse.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PredefinedUrlCategoriesResponse.java new file mode 100644 index 000000000000..be943043d46a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PredefinedUrlCategoriesResponse.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PredefinedUrlCategoriesResponseInner; +import java.util.List; + +/** An immutable client-side representation of PredefinedUrlCategoriesResponse. */ +public interface PredefinedUrlCategoriesResponse { + /** + * Gets the value property: predefined url categories. + * + * @return the value value. + */ + List value(); + + /** + * Gets the nextLink property: next link. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.PredefinedUrlCategoriesResponseInner + * object. + * + * @return the inner object. + */ + PredefinedUrlCategoriesResponseInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PredefinedUrlCategory.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PredefinedUrlCategory.java new file mode 100644 index 000000000000..e98f2c79395e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PredefinedUrlCategory.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Predefined URL category object. */ +@Fluent +public final class PredefinedUrlCategory { + /* + * The action property. + */ + @JsonProperty(value = "action", required = true) + private String action; + + /* + * The name property. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** Creates an instance of PredefinedUrlCategory class. */ + public PredefinedUrlCategory() { + } + + /** + * Get the action property: The action property. + * + * @return the action value. + */ + public String action() { + return this.action; + } + + /** + * Set the action property: The action property. + * + * @param action the action value to set. + * @return the PredefinedUrlCategory object itself. + */ + public PredefinedUrlCategory withAction(String action) { + this.action = action; + return this; + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the PredefinedUrlCategory object itself. + */ + public PredefinedUrlCategory withName(String name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (action() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property action in model PredefinedUrlCategory")); + } + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model PredefinedUrlCategory")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PredefinedUrlCategory.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListGlobalRulestackResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListGlobalRulestackResource.java new file mode 100644 index 000000000000..4f4e656b7f72 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListGlobalRulestackResource.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListGlobalRulestackResourceInner; +import java.util.List; + +/** An immutable client-side representation of PrefixListGlobalRulestackResource. */ +public interface PrefixListGlobalRulestackResource { + /** + * 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 description property: prefix description. + * + * @return the description value. + */ + String description(); + + /** + * Gets the prefixList property: prefix list. + * + * @return the prefixList value. + */ + List prefixList(); + + /** + * Gets the etag property: etag info. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + String auditComment(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListGlobalRulestackResourceInner + * object. + * + * @return the inner object. + */ + PrefixListGlobalRulestackResourceInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListGlobalRulestackResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListGlobalRulestackResourceListResult.java new file mode 100644 index 000000000000..bfb2e61684ce --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListGlobalRulestackResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListGlobalRulestackResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a PrefixListGlobalRulestackResource list operation. */ +@Fluent +public final class PrefixListGlobalRulestackResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of PrefixListGlobalRulestackResourceListResult class. */ + public PrefixListGlobalRulestackResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the PrefixListGlobalRulestackResourceListResult object itself. + */ + public PrefixListGlobalRulestackResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the PrefixListGlobalRulestackResourceListResult object itself. + */ + public PrefixListGlobalRulestackResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model PrefixListGlobalRulestackResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrefixListGlobalRulestackResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListGlobalRulestacks.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListGlobalRulestacks.java new file mode 100644 index 000000000000..254e0df01d8c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListGlobalRulestacks.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListGlobalRulestackResourceInner; + +/** Resource collection API of PrefixListGlobalRulestacks. */ +public interface PrefixListGlobalRulestacks { + /** + * List PrefixListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 PrefixListGlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(String globalRulestackName); + + /** + * List PrefixListGlobalRulestackResource resources by Tenant. + * + * @param globalRulestackName GlobalRulestack resource name. + * @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 PrefixListGlobalRulestackResource list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(String globalRulestackName, Context context); + + /** + * Get a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @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 PrefixListGlobalRulestackResource along with {@link Response}. + */ + Response getWithResponse( + String globalRulestackName, String name, Context context); + + /** + * Get a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 PrefixListGlobalRulestackResource. + */ + PrefixListGlobalRulestackResource get(String globalRulestackName, String name); + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList. + */ + PrefixListGlobalRulestackResource createOrUpdate( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource); + + /** + * Create a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @param resource 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 globalRulestack prefixList. + */ + PrefixListGlobalRulestackResource createOrUpdate( + String globalRulestackName, String name, PrefixListGlobalRulestackResourceInner resource, Context context); + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 globalRulestackName, String name); + + /** + * Delete a PrefixListGlobalRulestackResource. + * + * @param globalRulestackName GlobalRulestack resource name. + * @param name Local Rule priority. + * @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 globalRulestackName, String name, Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListLocalRulestacks.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListLocalRulestacks.java new file mode 100644 index 000000000000..2093f7f6f725 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListLocalRulestacks.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.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 PrefixListLocalRulestacks. */ +public interface PrefixListLocalRulestacks { + /** + * List PrefixListResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 PrefixListResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByLocalRulestacks(String resourceGroupName, String localRulestackName); + + /** + * List PrefixListResource resources by LocalRulestacks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @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 PrefixListResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByLocalRulestacks( + String resourceGroupName, String localRulestackName, Context context); + + /** + * Get a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @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 PrefixListResource along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String localRulestackName, String name, Context context); + + /** + * Get a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 PrefixListResource. + */ + PrefixListResource get(String resourceGroupName, String localRulestackName, String name); + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 localRulestackName, String name); + + /** + * Delete a PrefixListResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @param name Local Rule priority. + * @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 localRulestackName, String name, Context context); + + /** + * Get a PrefixListResource. + * + * @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 PrefixListResource along with {@link Response}. + */ + PrefixListResource getById(String id); + + /** + * Get a PrefixListResource. + * + * @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 PrefixListResource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a PrefixListResource. + * + * @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 a PrefixListResource. + * + * @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 PrefixListResource resource. + * + * @param name resource name. + * @return the first stage of the new PrefixListResource definition. + */ + PrefixListResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListResource.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListResource.java new file mode 100644 index 000000000000..a806a6bee118 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListResource.java @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListResourceInner; +import java.util.List; + +/** An immutable client-side representation of PrefixListResource. */ +public interface PrefixListResource { + /** + * 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 description property: prefix description. + * + * @return the description value. + */ + String description(); + + /** + * Gets the prefixList property: prefix list. + * + * @return the prefixList value. + */ + List prefixList(); + + /** + * Gets the etag property: etag info. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the auditComment property: comment for this object. + * + * @return the auditComment value. + */ + String auditComment(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListResourceInner object. + * + * @return the inner object. + */ + PrefixListResourceInner innerModel(); + + /** The entirety of the PrefixListResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithPrefixList, + DefinitionStages.WithCreate { + } + /** The PrefixListResource definition stages. */ + interface DefinitionStages { + /** The first stage of the PrefixListResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the PrefixListResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, localRulestackName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name. + * @return the next definition stage. + */ + WithPrefixList withExistingLocalRulestack(String resourceGroupName, String localRulestackName); + } + /** The stage of the PrefixListResource definition allowing to specify prefixList. */ + interface WithPrefixList { + /** + * Specifies the prefixList property: prefix list. + * + * @param prefixList prefix list. + * @return the next definition stage. + */ + WithCreate withPrefixList(List prefixList); + } + /** + * The stage of the PrefixListResource 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.WithDescription, DefinitionStages.WithEtag, DefinitionStages.WithAuditComment { + /** + * Executes the create request. + * + * @return the created resource. + */ + PrefixListResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PrefixListResource create(Context context); + } + /** The stage of the PrefixListResource definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: prefix description. + * + * @param description prefix description. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the PrefixListResource definition allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: etag info. + * + * @param etag etag info. + * @return the next definition stage. + */ + WithCreate withEtag(String etag); + } + /** The stage of the PrefixListResource definition allowing to specify auditComment. */ + interface WithAuditComment { + /** + * Specifies the auditComment property: comment for this object. + * + * @param auditComment comment for this object. + * @return the next definition stage. + */ + WithCreate withAuditComment(String auditComment); + } + } + /** + * Begins update for the PrefixListResource resource. + * + * @return the stage of resource update. + */ + PrefixListResource.Update update(); + + /** The template for PrefixListResource update. */ + interface Update + extends UpdateStages.WithDescription, + UpdateStages.WithPrefixList, + UpdateStages.WithEtag, + UpdateStages.WithAuditComment { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PrefixListResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PrefixListResource apply(Context context); + } + /** The PrefixListResource update stages. */ + interface UpdateStages { + /** The stage of the PrefixListResource update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: prefix description. + * + * @param description prefix description. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the PrefixListResource update allowing to specify prefixList. */ + interface WithPrefixList { + /** + * Specifies the prefixList property: prefix list. + * + * @param prefixList prefix list. + * @return the next definition stage. + */ + Update withPrefixList(List prefixList); + } + /** The stage of the PrefixListResource update allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: etag info. + * + * @param etag etag info. + * @return the next definition stage. + */ + Update withEtag(String etag); + } + /** The stage of the PrefixListResource update allowing to specify auditComment. */ + interface WithAuditComment { + /** + * Specifies the auditComment property: comment for this object. + * + * @param auditComment comment for this object. + * @return the next definition stage. + */ + Update withAuditComment(String auditComment); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PrefixListResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PrefixListResource refresh(Context context); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListResourceListResult.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListResourceListResult.java new file mode 100644 index 000000000000..688db45070be --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/PrefixListResourceListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a PrefixListResource list operation. */ +@Fluent +public final class PrefixListResourceListResult { + /* + * The items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of PrefixListResourceListResult class. */ + public PrefixListResourceListResult() { + } + + /** + * Get the value property: The items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The items on this page. + * + * @param value the value value to set. + * @return the PrefixListResourceListResult object itself. + */ + public PrefixListResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the PrefixListResourceListResult object itself. + */ + public PrefixListResourceListResult 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) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model PrefixListResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrefixListResourceListResult.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ProtocolType.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ProtocolType.java new file mode 100644 index 000000000000..08a1ec255406 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ProtocolType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Protocol Enum. */ +public final class ProtocolType extends ExpandableStringEnum { + /** Static value TCP for ProtocolType. */ + public static final ProtocolType TCP = fromString("TCP"); + + /** Static value UDP for ProtocolType. */ + public static final ProtocolType UDP = fromString("UDP"); + + /** + * Creates a new instance of ProtocolType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProtocolType() { + } + + /** + * Creates or finds a ProtocolType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProtocolType. + */ + @JsonCreator + public static ProtocolType fromString(String name) { + return fromString(name, ProtocolType.class); + } + + /** + * Gets known ProtocolType values. + * + * @return known ProtocolType values. + */ + public static Collection values() { + return values(ProtocolType.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ProvisioningState.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ProvisioningState.java new file mode 100644 index 000000000000..02542cdbc321 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ProvisioningState.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of the firewall resource. */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Accepted for ProvisioningState. */ + public static final ProvisioningState ACCEPTED = fromString("Accepted"); + + /** Static value Creating for ProvisioningState. */ + public static final ProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for ProvisioningState. */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for ProvisioningState. */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for ProvisioningState. */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Deleted for ProvisioningState. */ + public static final ProvisioningState DELETED = fromString("Deleted"); + + /** Static value NotSpecified for ProvisioningState. */ + public static final ProvisioningState NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ReadOnlyProvisioningState.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ReadOnlyProvisioningState.java new file mode 100644 index 000000000000..327f470be3e5 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ReadOnlyProvisioningState.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of the firewall resource. */ +public final class ReadOnlyProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for ReadOnlyProvisioningState. */ + public static final ReadOnlyProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ReadOnlyProvisioningState. */ + public static final ReadOnlyProvisioningState FAILED = fromString("Failed"); + + /** Static value Deleted for ReadOnlyProvisioningState. */ + public static final ReadOnlyProvisioningState DELETED = fromString("Deleted"); + + /** + * Creates a new instance of ReadOnlyProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReadOnlyProvisioningState() { + } + + /** + * Creates or finds a ReadOnlyProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ReadOnlyProvisioningState. + */ + @JsonCreator + public static ReadOnlyProvisioningState fromString(String name) { + return fromString(name, ReadOnlyProvisioningState.class); + } + + /** + * Gets known ReadOnlyProvisioningState values. + * + * @return known ReadOnlyProvisioningState values. + */ + public static Collection values() { + return values(ReadOnlyProvisioningState.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/RuleCounter.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/RuleCounter.java new file mode 100644 index 000000000000..4431c7fca01c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/RuleCounter.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of RuleCounter. */ +public interface RuleCounter { + /** + * Gets the priority property: priority number. + * + * @return the priority value. + */ + String priority(); + + /** + * Gets the ruleStackName property: rule Stack Name. + * + * @return the ruleStackName value. + */ + String ruleStackName(); + + /** + * Gets the ruleListName property: rule list name. + * + * @return the ruleListName value. + */ + String ruleListName(); + + /** + * Gets the firewallName property: firewall name. + * + * @return the firewallName value. + */ + String firewallName(); + + /** + * Gets the ruleName property: rule name. + * + * @return the ruleName value. + */ + String ruleName(); + + /** + * Gets the hitCount property: hit count. + * + * @return the hitCount value. + */ + Integer hitCount(); + + /** + * Gets the appSeen property: apps seen. + * + * @return the appSeen value. + */ + AppSeenData appSeen(); + + /** + * Gets the timestamp property: timestamp of response. + * + * @return the timestamp value. + */ + OffsetDateTime timestamp(); + + /** + * Gets the requestTimestamp property: timestamp of request. + * + * @return the requestTimestamp value. + */ + OffsetDateTime requestTimestamp(); + + /** + * Gets the lastUpdatedTimestamp property: last updated timestamp. + * + * @return the lastUpdatedTimestamp value. + */ + OffsetDateTime lastUpdatedTimestamp(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterInner object. + * + * @return the inner object. + */ + RuleCounterInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/RuleCounterReset.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/RuleCounterReset.java new file mode 100644 index 000000000000..cd9033e798c1 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/RuleCounterReset.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterResetInner; + +/** An immutable client-side representation of RuleCounterReset. */ +public interface RuleCounterReset { + /** + * Gets the priority property: priority number. + * + * @return the priority value. + */ + String priority(); + + /** + * Gets the ruleStackName property: rule Stack Name. + * + * @return the ruleStackName value. + */ + String ruleStackName(); + + /** + * Gets the ruleListName property: rule list name. + * + * @return the ruleListName value. + */ + String ruleListName(); + + /** + * Gets the firewallName property: firewall name. + * + * @return the firewallName value. + */ + String firewallName(); + + /** + * Gets the ruleName property: rule name. + * + * @return the ruleName value. + */ + String ruleName(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.RuleCounterResetInner object. + * + * @return the inner object. + */ + RuleCounterResetInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/RulestackDetails.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/RulestackDetails.java new file mode 100644 index 000000000000..03e18a11eb84 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/RulestackDetails.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Associated rulestack details. */ +@Fluent +public final class RulestackDetails { + /* + * Resource Id + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * Associated rulestack Id + */ + @JsonProperty(value = "rulestackId") + private String rulestackId; + + /* + * Rulestack location + */ + @JsonProperty(value = "location") + private String location; + + /** Creates an instance of RulestackDetails class. */ + public RulestackDetails() { + } + + /** + * Get the resourceId property: Resource Id. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Resource Id. + * + * @param resourceId the resourceId value to set. + * @return the RulestackDetails object itself. + */ + public RulestackDetails withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the rulestackId property: Associated rulestack Id. + * + * @return the rulestackId value. + */ + public String rulestackId() { + return this.rulestackId; + } + + /** + * Set the rulestackId property: Associated rulestack Id. + * + * @param rulestackId the rulestackId value to set. + * @return the RulestackDetails object itself. + */ + public RulestackDetails withRulestackId(String rulestackId) { + this.rulestackId = rulestackId; + return this; + } + + /** + * Get the location property: Rulestack location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Rulestack location. + * + * @param location the location value to set. + * @return the RulestackDetails object itself. + */ + public RulestackDetails withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ScopeType.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ScopeType.java new file mode 100644 index 000000000000..104e0fbf2b64 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ScopeType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Rulestack Type. */ +public final class ScopeType extends ExpandableStringEnum { + /** Static value LOCAL for ScopeType. */ + public static final ScopeType LOCAL = fromString("LOCAL"); + + /** Static value GLOBAL for ScopeType. */ + public static final ScopeType GLOBAL = fromString("GLOBAL"); + + /** + * Creates a new instance of ScopeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScopeType() { + } + + /** + * Creates or finds a ScopeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScopeType. + */ + @JsonCreator + public static ScopeType fromString(String name) { + return fromString(name, ScopeType.class); + } + + /** + * Gets known ScopeType values. + * + * @return known ScopeType values. + */ + public static Collection values() { + return values(ScopeType.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServices.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServices.java new file mode 100644 index 000000000000..440a965580ec --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServices.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** security services. */ +@Fluent +public final class SecurityServices { + /* + * IPs Vulnerability Profile Data + */ + @JsonProperty(value = "vulnerabilityProfile") + private String vulnerabilityProfile; + + /* + * Anti spyware Profile data + */ + @JsonProperty(value = "antiSpywareProfile") + private String antiSpywareProfile; + + /* + * anti virus profile data + */ + @JsonProperty(value = "antiVirusProfile") + private String antiVirusProfile; + + /* + * URL filtering profile data + */ + @JsonProperty(value = "urlFilteringProfile") + private String urlFilteringProfile; + + /* + * File blocking profile data + */ + @JsonProperty(value = "fileBlockingProfile") + private String fileBlockingProfile; + + /* + * DNS Subscription profile data + */ + @JsonProperty(value = "dnsSubscription") + private String dnsSubscription; + + /* + * Untrusted Egress Decryption profile data + */ + @JsonProperty(value = "outboundUnTrustCertificate") + private String outboundUnTrustCertificate; + + /* + * Trusted Egress Decryption profile data + */ + @JsonProperty(value = "outboundTrustCertificate") + private String outboundTrustCertificate; + + /** Creates an instance of SecurityServices class. */ + public SecurityServices() { + } + + /** + * Get the vulnerabilityProfile property: IPs Vulnerability Profile Data. + * + * @return the vulnerabilityProfile value. + */ + public String vulnerabilityProfile() { + return this.vulnerabilityProfile; + } + + /** + * Set the vulnerabilityProfile property: IPs Vulnerability Profile Data. + * + * @param vulnerabilityProfile the vulnerabilityProfile value to set. + * @return the SecurityServices object itself. + */ + public SecurityServices withVulnerabilityProfile(String vulnerabilityProfile) { + this.vulnerabilityProfile = vulnerabilityProfile; + return this; + } + + /** + * Get the antiSpywareProfile property: Anti spyware Profile data. + * + * @return the antiSpywareProfile value. + */ + public String antiSpywareProfile() { + return this.antiSpywareProfile; + } + + /** + * Set the antiSpywareProfile property: Anti spyware Profile data. + * + * @param antiSpywareProfile the antiSpywareProfile value to set. + * @return the SecurityServices object itself. + */ + public SecurityServices withAntiSpywareProfile(String antiSpywareProfile) { + this.antiSpywareProfile = antiSpywareProfile; + return this; + } + + /** + * Get the antiVirusProfile property: anti virus profile data. + * + * @return the antiVirusProfile value. + */ + public String antiVirusProfile() { + return this.antiVirusProfile; + } + + /** + * Set the antiVirusProfile property: anti virus profile data. + * + * @param antiVirusProfile the antiVirusProfile value to set. + * @return the SecurityServices object itself. + */ + public SecurityServices withAntiVirusProfile(String antiVirusProfile) { + this.antiVirusProfile = antiVirusProfile; + return this; + } + + /** + * Get the urlFilteringProfile property: URL filtering profile data. + * + * @return the urlFilteringProfile value. + */ + public String urlFilteringProfile() { + return this.urlFilteringProfile; + } + + /** + * Set the urlFilteringProfile property: URL filtering profile data. + * + * @param urlFilteringProfile the urlFilteringProfile value to set. + * @return the SecurityServices object itself. + */ + public SecurityServices withUrlFilteringProfile(String urlFilteringProfile) { + this.urlFilteringProfile = urlFilteringProfile; + return this; + } + + /** + * Get the fileBlockingProfile property: File blocking profile data. + * + * @return the fileBlockingProfile value. + */ + public String fileBlockingProfile() { + return this.fileBlockingProfile; + } + + /** + * Set the fileBlockingProfile property: File blocking profile data. + * + * @param fileBlockingProfile the fileBlockingProfile value to set. + * @return the SecurityServices object itself. + */ + public SecurityServices withFileBlockingProfile(String fileBlockingProfile) { + this.fileBlockingProfile = fileBlockingProfile; + return this; + } + + /** + * Get the dnsSubscription property: DNS Subscription profile data. + * + * @return the dnsSubscription value. + */ + public String dnsSubscription() { + return this.dnsSubscription; + } + + /** + * Set the dnsSubscription property: DNS Subscription profile data. + * + * @param dnsSubscription the dnsSubscription value to set. + * @return the SecurityServices object itself. + */ + public SecurityServices withDnsSubscription(String dnsSubscription) { + this.dnsSubscription = dnsSubscription; + return this; + } + + /** + * Get the outboundUnTrustCertificate property: Untrusted Egress Decryption profile data. + * + * @return the outboundUnTrustCertificate value. + */ + public String outboundUnTrustCertificate() { + return this.outboundUnTrustCertificate; + } + + /** + * Set the outboundUnTrustCertificate property: Untrusted Egress Decryption profile data. + * + * @param outboundUnTrustCertificate the outboundUnTrustCertificate value to set. + * @return the SecurityServices object itself. + */ + public SecurityServices withOutboundUnTrustCertificate(String outboundUnTrustCertificate) { + this.outboundUnTrustCertificate = outboundUnTrustCertificate; + return this; + } + + /** + * Get the outboundTrustCertificate property: Trusted Egress Decryption profile data. + * + * @return the outboundTrustCertificate value. + */ + public String outboundTrustCertificate() { + return this.outboundTrustCertificate; + } + + /** + * Set the outboundTrustCertificate property: Trusted Egress Decryption profile data. + * + * @param outboundTrustCertificate the outboundTrustCertificate value to set. + * @return the SecurityServices object itself. + */ + public SecurityServices withOutboundTrustCertificate(String outboundTrustCertificate) { + this.outboundTrustCertificate = outboundTrustCertificate; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServicesResponse.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServicesResponse.java new file mode 100644 index 000000000000..6891ff772468 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServicesResponse.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SecurityServicesResponseInner; + +/** An immutable client-side representation of SecurityServicesResponse. */ +public interface SecurityServicesResponse { + /** + * Gets the value property: response value. + * + * @return the value value. + */ + SecurityServicesTypeList value(); + + /** + * Gets the nextLink property: next link. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.SecurityServicesResponseInner object. + * + * @return the inner object. + */ + SecurityServicesResponseInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServicesTypeEnum.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServicesTypeEnum.java new file mode 100644 index 000000000000..eefa1b7f0004 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServicesTypeEnum.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SecurityServicesTypeEnum. */ +public final class SecurityServicesTypeEnum extends ExpandableStringEnum { + /** Static value antiSpyware for SecurityServicesTypeEnum. */ + public static final SecurityServicesTypeEnum ANTI_SPYWARE = fromString("antiSpyware"); + + /** Static value antiVirus for SecurityServicesTypeEnum. */ + public static final SecurityServicesTypeEnum ANTI_VIRUS = fromString("antiVirus"); + + /** Static value ipsVulnerability for SecurityServicesTypeEnum. */ + public static final SecurityServicesTypeEnum IPS_VULNERABILITY = fromString("ipsVulnerability"); + + /** Static value urlFiltering for SecurityServicesTypeEnum. */ + public static final SecurityServicesTypeEnum URL_FILTERING = fromString("urlFiltering"); + + /** Static value fileBlocking for SecurityServicesTypeEnum. */ + public static final SecurityServicesTypeEnum FILE_BLOCKING = fromString("fileBlocking"); + + /** Static value dnsSubscription for SecurityServicesTypeEnum. */ + public static final SecurityServicesTypeEnum DNS_SUBSCRIPTION = fromString("dnsSubscription"); + + /** + * Creates a new instance of SecurityServicesTypeEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecurityServicesTypeEnum() { + } + + /** + * Creates or finds a SecurityServicesTypeEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding SecurityServicesTypeEnum. + */ + @JsonCreator + public static SecurityServicesTypeEnum fromString(String name) { + return fromString(name, SecurityServicesTypeEnum.class); + } + + /** + * Gets known SecurityServicesTypeEnum values. + * + * @return known SecurityServicesTypeEnum values. + */ + public static Collection values() { + return values(SecurityServicesTypeEnum.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServicesTypeList.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServicesTypeList.java new file mode 100644 index 000000000000..98097d8b9452 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SecurityServicesTypeList.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Security services type list. */ +@Fluent +public final class SecurityServicesTypeList { + /* + * security services type + */ + @JsonProperty(value = "type") + private String type; + + /* + * list + */ + @JsonProperty(value = "entry", required = true) + private List entry; + + /** Creates an instance of SecurityServicesTypeList class. */ + public SecurityServicesTypeList() { + } + + /** + * Get the type property: security services type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: security services type. + * + * @param type the type value to set. + * @return the SecurityServicesTypeList object itself. + */ + public SecurityServicesTypeList withType(String type) { + this.type = type; + return this; + } + + /** + * Get the entry property: list. + * + * @return the entry value. + */ + public List entry() { + return this.entry; + } + + /** + * Set the entry property: list. + * + * @param entry the entry value to set. + * @return the SecurityServicesTypeList object itself. + */ + public SecurityServicesTypeList withEntry(List entry) { + this.entry = entry; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (entry() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property entry in model SecurityServicesTypeList")); + } else { + entry().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SecurityServicesTypeList.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ServerStatus.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ServerStatus.java new file mode 100644 index 000000000000..1af5ce53aa3a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/ServerStatus.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Connectivity Status for Panorama Server. */ +public final class ServerStatus extends ExpandableStringEnum { + /** Static value UP for ServerStatus. */ + public static final ServerStatus UP = fromString("UP"); + + /** Static value DOWN for ServerStatus. */ + public static final ServerStatus DOWN = fromString("DOWN"); + + /** + * Creates a new instance of ServerStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServerStatus() { + } + + /** + * Creates or finds a ServerStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServerStatus. + */ + @JsonCreator + public static ServerStatus fromString(String name) { + return fromString(name, ServerStatus.class); + } + + /** + * Gets known ServerStatus values. + * + * @return known ServerStatus values. + */ + public static Collection values() { + return values(ServerStatus.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SourceAddr.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SourceAddr.java new file mode 100644 index 000000000000..35e27a1d58c4 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SourceAddr.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Address properties. */ +@Fluent +public final class SourceAddr { + /* + * special value 'any' + */ + @JsonProperty(value = "cidrs") + private List cidrs; + + /* + * list of countries + */ + @JsonProperty(value = "countries") + private List countries; + + /* + * list of feeds + */ + @JsonProperty(value = "feeds") + private List feeds; + + /* + * prefix list + */ + @JsonProperty(value = "prefixLists") + private List prefixLists; + + /** Creates an instance of SourceAddr class. */ + public SourceAddr() { + } + + /** + * Get the cidrs property: special value 'any'. + * + * @return the cidrs value. + */ + public List cidrs() { + return this.cidrs; + } + + /** + * Set the cidrs property: special value 'any'. + * + * @param cidrs the cidrs value to set. + * @return the SourceAddr object itself. + */ + public SourceAddr withCidrs(List cidrs) { + this.cidrs = cidrs; + return this; + } + + /** + * Get the countries property: list of countries. + * + * @return the countries value. + */ + public List countries() { + return this.countries; + } + + /** + * Set the countries property: list of countries. + * + * @param countries the countries value to set. + * @return the SourceAddr object itself. + */ + public SourceAddr withCountries(List countries) { + this.countries = countries; + return this; + } + + /** + * Get the feeds property: list of feeds. + * + * @return the feeds value. + */ + public List feeds() { + return this.feeds; + } + + /** + * Set the feeds property: list of feeds. + * + * @param feeds the feeds value to set. + * @return the SourceAddr object itself. + */ + public SourceAddr withFeeds(List feeds) { + this.feeds = feeds; + return this; + } + + /** + * Get the prefixLists property: prefix list. + * + * @return the prefixLists value. + */ + public List prefixLists() { + return this.prefixLists; + } + + /** + * Set the prefixLists property: prefix list. + * + * @param prefixLists the prefixLists value to set. + * @return the SourceAddr object itself. + */ + public SourceAddr withPrefixLists(List prefixLists) { + this.prefixLists = prefixLists; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/StateEnum.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/StateEnum.java new file mode 100644 index 000000000000..88729beea72b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/StateEnum.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Enabled or Disabled Enum. */ +public final class StateEnum extends ExpandableStringEnum { + /** Static value DISABLED for StateEnum. */ + public static final StateEnum DISABLED = fromString("DISABLED"); + + /** Static value ENABLED for StateEnum. */ + public static final StateEnum ENABLED = fromString("ENABLED"); + + /** + * Creates a new instance of StateEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StateEnum() { + } + + /** + * Creates or finds a StateEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding StateEnum. + */ + @JsonCreator + public static StateEnum fromString(String name) { + return fromString(name, StateEnum.class); + } + + /** + * Gets known StateEnum values. + * + * @return known StateEnum values. + */ + public static Collection values() { + return values(StateEnum.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/StorageAccount.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/StorageAccount.java new file mode 100644 index 000000000000..9394b9407142 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/StorageAccount.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Storage Account configurations. */ +@Fluent +public final class StorageAccount { + /* + * Resource ID of storage account + */ + @JsonProperty(value = "id") + private String id; + + /* + * Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * Storage account name + */ + @JsonProperty(value = "accountName") + private String accountName; + + /** Creates an instance of StorageAccount class. */ + public StorageAccount() { + } + + /** + * Get the id property: Resource ID of storage account. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID of storage account. + * + * @param id the id value to set. + * @return the StorageAccount object itself. + */ + public StorageAccount withId(String id) { + this.id = id; + return this; + } + + /** + * Get the subscriptionId property: Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the StorageAccount object itself. + */ + public StorageAccount withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the accountName property: Storage account name. + * + * @return the accountName value. + */ + public String accountName() { + return this.accountName; + } + + /** + * Set the accountName property: Storage account name. + * + * @param accountName the accountName value to set. + * @return the StorageAccount object itself. + */ + public StorageAccount withAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SupportInfo.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SupportInfo.java new file mode 100644 index 000000000000..8a060ab10b07 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/SupportInfo.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.SupportInfoInner; + +/** An immutable client-side representation of SupportInfo. */ +public interface SupportInfo { + /** + * Gets the productSku property: product SKU associated with given resource. + * + * @return the productSku value. + */ + String productSku(); + + /** + * Gets the productSerial property: product Serial associated with given resource. + * + * @return the productSerial value. + */ + String productSerial(); + + /** + * Gets the accountRegistered property: account registered in Customer Support Portal. + * + * @return the accountRegistered value. + */ + BooleanEnum accountRegistered(); + + /** + * Gets the accountId property: Support account associated with given resource. + * + * @return the accountId value. + */ + String accountId(); + + /** + * Gets the userDomainSupported property: user domain is supported in Customer Support Portal. + * + * @return the userDomainSupported value. + */ + BooleanEnum userDomainSupported(); + + /** + * Gets the userRegistered property: user registered in Customer Support Portal. + * + * @return the userRegistered value. + */ + BooleanEnum userRegistered(); + + /** + * Gets the freeTrial property: Product usage is in free trial period. + * + * @return the freeTrial value. + */ + BooleanEnum freeTrial(); + + /** + * Gets the freeTrialDaysLeft property: Free trial days remaining. + * + * @return the freeTrialDaysLeft value. + */ + Integer freeTrialDaysLeft(); + + /** + * Gets the freeTrialCreditLeft property: Free trial credit remaining. + * + * @return the freeTrialCreditLeft value. + */ + Integer freeTrialCreditLeft(); + + /** + * Gets the helpUrl property: URL for paloaltonetworks live community. + * + * @return the helpUrl value. + */ + String helpUrl(); + + /** + * Gets the supportUrl property: URL for paloaltonetworks Customer Service Portal. + * + * @return the supportUrl value. + */ + String supportUrl(); + + /** + * Gets the registerUrl property: URL for registering product in paloaltonetworks Customer Service Portal. + * + * @return the registerUrl value. + */ + String registerUrl(); + + /** + * Gets the inner com.azure.resourcemanager.paloaltonetworks.fluent.models.SupportInfoInner object. + * + * @return the inner object. + */ + SupportInfoInner innerModel(); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/TagInfo.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/TagInfo.java new file mode 100644 index 000000000000..9946903c0835 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/TagInfo.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Tag. */ +@Fluent +public final class TagInfo { + /* + * tag name + */ + @JsonProperty(value = "key", required = true) + private String key; + + /* + * tag value + */ + @JsonProperty(value = "value", required = true) + private String value; + + /** Creates an instance of TagInfo class. */ + public TagInfo() { + } + + /** + * Get the key property: tag name. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: tag name. + * + * @param key the key value to set. + * @return the TagInfo object itself. + */ + public TagInfo withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the value property: tag value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: tag value. + * + * @param value the value value to set. + * @return the TagInfo object itself. + */ + public TagInfo withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (key() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property key in model TagInfo")); + } + if (value() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property value in model TagInfo")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TagInfo.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/UsageType.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/UsageType.java new file mode 100644 index 000000000000..082d53124dd2 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/UsageType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Usage Type. */ +public final class UsageType extends ExpandableStringEnum { + /** Static value PAYG for UsageType. */ + public static final UsageType PAYG = fromString("PAYG"); + + /** Static value COMMITTED for UsageType. */ + public static final UsageType COMMITTED = fromString("COMMITTED"); + + /** + * Creates a new instance of UsageType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UsageType() { + } + + /** + * Creates or finds a UsageType from its string representation. + * + * @param name a name to look for. + * @return the corresponding UsageType. + */ + @JsonCreator + public static UsageType fromString(String name) { + return fromString(name, UsageType.class); + } + + /** + * Gets known UsageType values. + * + * @return known UsageType values. + */ + public static Collection values() { + return values(UsageType.class); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/VnetConfiguration.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/VnetConfiguration.java new file mode 100644 index 000000000000..624a88ddc6e5 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/VnetConfiguration.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** VnetInfo for Firewall Networking. */ +@Fluent +public final class VnetConfiguration { + /* + * Azure Virtual Network + */ + @JsonProperty(value = "vnet", required = true) + private IpAddressSpace vnet; + + /* + * Trust Subnet + */ + @JsonProperty(value = "trustSubnet", required = true) + private IpAddressSpace trustSubnet; + + /* + * Untrust Subnet + */ + @JsonProperty(value = "unTrustSubnet", required = true) + private IpAddressSpace unTrustSubnet; + + /* + * IP of trust subnet for UDR + */ + @JsonProperty(value = "ipOfTrustSubnetForUdr") + private IpAddress ipOfTrustSubnetForUdr; + + /** Creates an instance of VnetConfiguration class. */ + public VnetConfiguration() { + } + + /** + * Get the vnet property: Azure Virtual Network. + * + * @return the vnet value. + */ + public IpAddressSpace vnet() { + return this.vnet; + } + + /** + * Set the vnet property: Azure Virtual Network. + * + * @param vnet the vnet value to set. + * @return the VnetConfiguration object itself. + */ + public VnetConfiguration withVnet(IpAddressSpace vnet) { + this.vnet = vnet; + return this; + } + + /** + * Get the trustSubnet property: Trust Subnet. + * + * @return the trustSubnet value. + */ + public IpAddressSpace trustSubnet() { + return this.trustSubnet; + } + + /** + * Set the trustSubnet property: Trust Subnet. + * + * @param trustSubnet the trustSubnet value to set. + * @return the VnetConfiguration object itself. + */ + public VnetConfiguration withTrustSubnet(IpAddressSpace trustSubnet) { + this.trustSubnet = trustSubnet; + return this; + } + + /** + * Get the unTrustSubnet property: Untrust Subnet. + * + * @return the unTrustSubnet value. + */ + public IpAddressSpace unTrustSubnet() { + return this.unTrustSubnet; + } + + /** + * Set the unTrustSubnet property: Untrust Subnet. + * + * @param unTrustSubnet the unTrustSubnet value to set. + * @return the VnetConfiguration object itself. + */ + public VnetConfiguration withUnTrustSubnet(IpAddressSpace unTrustSubnet) { + this.unTrustSubnet = unTrustSubnet; + return this; + } + + /** + * Get the ipOfTrustSubnetForUdr property: IP of trust subnet for UDR. + * + * @return the ipOfTrustSubnetForUdr value. + */ + public IpAddress ipOfTrustSubnetForUdr() { + return this.ipOfTrustSubnetForUdr; + } + + /** + * Set the ipOfTrustSubnetForUdr property: IP of trust subnet for UDR. + * + * @param ipOfTrustSubnetForUdr the ipOfTrustSubnetForUdr value to set. + * @return the VnetConfiguration object itself. + */ + public VnetConfiguration withIpOfTrustSubnetForUdr(IpAddress ipOfTrustSubnetForUdr) { + this.ipOfTrustSubnetForUdr = ipOfTrustSubnetForUdr; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vnet() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property vnet in model VnetConfiguration")); + } else { + vnet().validate(); + } + if (trustSubnet() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property trustSubnet in model VnetConfiguration")); + } else { + trustSubnet().validate(); + } + if (unTrustSubnet() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property unTrustSubnet in model VnetConfiguration")); + } else { + unTrustSubnet().validate(); + } + if (ipOfTrustSubnetForUdr() != null) { + ipOfTrustSubnetForUdr().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VnetConfiguration.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/VwanConfiguration.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/VwanConfiguration.java new file mode 100644 index 000000000000..b5cf47ff1c42 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/VwanConfiguration.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** VwanInfo for Firewall Networking. */ +@Fluent +public final class VwanConfiguration { + /* + * Network Virtual Appliance resource ID + */ + @JsonProperty(value = "networkVirtualApplianceId") + private String networkVirtualApplianceId; + + /* + * vHub Address + */ + @JsonProperty(value = "vHub", required = true) + private IpAddressSpace vHub; + + /* + * Trust Subnet + */ + @JsonProperty(value = "trustSubnet") + private IpAddressSpace trustSubnet; + + /* + * Untrust Subnet + */ + @JsonProperty(value = "unTrustSubnet") + private IpAddressSpace unTrustSubnet; + + /* + * IP of trust subnet for UDR + */ + @JsonProperty(value = "ipOfTrustSubnetForUdr") + private IpAddress ipOfTrustSubnetForUdr; + + /** Creates an instance of VwanConfiguration class. */ + public VwanConfiguration() { + } + + /** + * Get the networkVirtualApplianceId property: Network Virtual Appliance resource ID. + * + * @return the networkVirtualApplianceId value. + */ + public String networkVirtualApplianceId() { + return this.networkVirtualApplianceId; + } + + /** + * Set the networkVirtualApplianceId property: Network Virtual Appliance resource ID. + * + * @param networkVirtualApplianceId the networkVirtualApplianceId value to set. + * @return the VwanConfiguration object itself. + */ + public VwanConfiguration withNetworkVirtualApplianceId(String networkVirtualApplianceId) { + this.networkVirtualApplianceId = networkVirtualApplianceId; + return this; + } + + /** + * Get the vHub property: vHub Address. + * + * @return the vHub value. + */ + public IpAddressSpace vHub() { + return this.vHub; + } + + /** + * Set the vHub property: vHub Address. + * + * @param vHub the vHub value to set. + * @return the VwanConfiguration object itself. + */ + public VwanConfiguration withVHub(IpAddressSpace vHub) { + this.vHub = vHub; + return this; + } + + /** + * Get the trustSubnet property: Trust Subnet. + * + * @return the trustSubnet value. + */ + public IpAddressSpace trustSubnet() { + return this.trustSubnet; + } + + /** + * Set the trustSubnet property: Trust Subnet. + * + * @param trustSubnet the trustSubnet value to set. + * @return the VwanConfiguration object itself. + */ + public VwanConfiguration withTrustSubnet(IpAddressSpace trustSubnet) { + this.trustSubnet = trustSubnet; + return this; + } + + /** + * Get the unTrustSubnet property: Untrust Subnet. + * + * @return the unTrustSubnet value. + */ + public IpAddressSpace unTrustSubnet() { + return this.unTrustSubnet; + } + + /** + * Set the unTrustSubnet property: Untrust Subnet. + * + * @param unTrustSubnet the unTrustSubnet value to set. + * @return the VwanConfiguration object itself. + */ + public VwanConfiguration withUnTrustSubnet(IpAddressSpace unTrustSubnet) { + this.unTrustSubnet = unTrustSubnet; + return this; + } + + /** + * Get the ipOfTrustSubnetForUdr property: IP of trust subnet for UDR. + * + * @return the ipOfTrustSubnetForUdr value. + */ + public IpAddress ipOfTrustSubnetForUdr() { + return this.ipOfTrustSubnetForUdr; + } + + /** + * Set the ipOfTrustSubnetForUdr property: IP of trust subnet for UDR. + * + * @param ipOfTrustSubnetForUdr the ipOfTrustSubnetForUdr value to set. + * @return the VwanConfiguration object itself. + */ + public VwanConfiguration withIpOfTrustSubnetForUdr(IpAddress ipOfTrustSubnetForUdr) { + this.ipOfTrustSubnetForUdr = ipOfTrustSubnetForUdr; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vHub() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property vHub in model VwanConfiguration")); + } else { + vHub().validate(); + } + if (trustSubnet() != null) { + trustSubnet().validate(); + } + if (unTrustSubnet() != null) { + unTrustSubnet().validate(); + } + if (ipOfTrustSubnetForUdr() != null) { + ipOfTrustSubnetForUdr().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VwanConfiguration.class); +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/package-info.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/package-info.java new file mode 100644 index 000000000000..f281b15c4f17 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the data models for PaloAltoNetworksCloudngfw. null. */ +package com.azure.resourcemanager.paloaltonetworks.models; diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/package-info.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/package-info.java new file mode 100644 index 000000000000..e8d8541d50e3 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/com/azure/resourcemanager/paloaltonetworks/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the classes for PaloAltoNetworksCloudngfw. null. */ +package com.azure.resourcemanager.paloaltonetworks; diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/module-info.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/module-info.java new file mode 100644 index 000000000000..41fde67a930c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/main/java/module-info.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.resourcemanager.paloaltonetworks { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.paloaltonetworks; + exports com.azure.resourcemanager.paloaltonetworks.fluent; + exports com.azure.resourcemanager.paloaltonetworks.fluent.models; + exports com.azure.resourcemanager.paloaltonetworks.models; + + opens com.azure.resourcemanager.paloaltonetworks.fluent.models to + com.azure.core, + com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.paloaltonetworks.models to + com.azure.core, + com.fasterxml.jackson.databind; +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackCreateOrUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackCreateOrUpdateSamples.java new file mode 100644 index 000000000000..b5fd4130124b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackCreateOrUpdateSamples.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.CertificateObjectGlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; + +/** Samples for CertificateObjectGlobalRulestack CreateOrUpdate. */ +public final class CertificateObjectGlobalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectGlobalRulestacks() + .createOrUpdate( + "praval", + "armid1", + new CertificateObjectGlobalRulestackResourceInner().withCertificateSelfSigned(BooleanEnum.TRUE), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectGlobalRulestacks() + .createOrUpdate( + "praval", + "armid1", + new CertificateObjectGlobalRulestackResourceInner() + .withCertificateSignerResourceId("") + .withCertificateSelfSigned(BooleanEnum.TRUE) + .withAuditComment("comment") + .withDescription("description") + .withEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackDeleteSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackDeleteSamples.java new file mode 100644 index 000000000000..5e40fa5ae703 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for CertificateObjectGlobalRulestack Delete. */ +public final class CertificateObjectGlobalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.certificateObjectGlobalRulestacks().delete("praval", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.certificateObjectGlobalRulestacks().delete("praval", "armid1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackGetSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackGetSamples.java new file mode 100644 index 000000000000..c364a0e9c61e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackGetSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for CertificateObjectGlobalRulestack Get. */ +public final class CertificateObjectGlobalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectGlobalRulestacks() + .getWithResponse("praval", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectGlobalRulestacks() + .getWithResponse("praval", "armid1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackListSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackListSamples.java new file mode 100644 index 000000000000..ff0e687c969b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectGlobalRulestackListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for CertificateObjectGlobalRulestack List. */ +public final class CertificateObjectGlobalRulestackListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_List_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.certificateObjectGlobalRulestacks().list("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_List_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectGlobalRulestack_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectGlobalRulestackListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.certificateObjectGlobalRulestacks().list("praval", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackCreateOrUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackCreateOrUpdateSamples.java new file mode 100644 index 000000000000..b99182598f85 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackCreateOrUpdateSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; + +/** Samples for CertificateObjectLocalRulestack CreateOrUpdate. */ +public final class CertificateObjectLocalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .define("armid1") + .withExistingLocalRulestack("rgopenapi", "lrs1") + .withCertificateSelfSigned(BooleanEnum.TRUE) + .create(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .define("armid1") + .withExistingLocalRulestack("rgopenapi", "lrs1") + .withCertificateSelfSigned(BooleanEnum.TRUE) + .withCertificateSignerResourceId("") + .withAuditComment("comment") + .withDescription("description") + .withEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c27") + .create(); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackDeleteSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackDeleteSamples.java new file mode 100644 index 000000000000..2f05b365cf09 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackDeleteSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for CertificateObjectLocalRulestack Delete. */ +public final class CertificateObjectLocalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .delete("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .delete("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackGetSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackGetSamples.java new file mode 100644 index 000000000000..7781511add65 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackGetSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for CertificateObjectLocalRulestack Get. */ +public final class CertificateObjectLocalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .getWithResponse("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .getWithResponse("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackListByLocalRulestacksSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackListByLocalRulestacksSamples.java new file mode 100644 index 000000000000..dfbbc9842dde --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/CertificateObjectLocalRulestackListByLocalRulestacksSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for CertificateObjectLocalRulestack ListByLocalRulestacks. */ +public final class CertificateObjectLocalRulestackListByLocalRulestacksSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackListByLocalRulestacksMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .listByLocalRulestacks("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen.json + */ + /** + * Sample code: CertificateObjectLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void certificateObjectLocalRulestackListByLocalRulestacksMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .certificateObjectLocalRulestacks() + .listByLocalRulestacks("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallStatusGetSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallStatusGetSamples.java new file mode 100644 index 000000000000..17cec787bcf2 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallStatusGetSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for FirewallStatus Get. */ +public final class FirewallStatusGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FirewallStatus_Get_MinimumSet_Gen.json + */ + /** + * Sample code: FirewallStatus_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallStatusGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewallStatus().getWithResponse("rgopenapi", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FirewallStatus_Get_MaximumSet_Gen.json + */ + /** + * Sample code: FirewallStatus_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallStatusGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewallStatus().getWithResponse("rgopenapi", "firewall1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallStatusListByFirewallsSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallStatusListByFirewallsSamples.java new file mode 100644 index 000000000000..e32c6bb2972a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallStatusListByFirewallsSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for FirewallStatus ListByFirewalls. */ +public final class FirewallStatusListByFirewallsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FirewallStatus_ListByFirewalls_MaximumSet_Gen.json + */ + /** + * Sample code: FirewallStatus_ListByFirewalls_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallStatusListByFirewallsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewallStatus().listByFirewalls("rgopenapi", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FirewallStatus_ListByFirewalls_MinimumSet_Gen.json + */ + /** + * Sample code: FirewallStatus_ListByFirewalls_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallStatusListByFirewallsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewallStatus().listByFirewalls("rgopenapi", "firewall1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsCreateOrUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..64a85443af99 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsCreateOrUpdateSamples.java @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerUserAssignedIdentity; +import com.azure.resourcemanager.paloaltonetworks.models.BillingCycle; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DnsProxy; +import com.azure.resourcemanager.paloaltonetworks.models.DnsSettings; +import com.azure.resourcemanager.paloaltonetworks.models.EgressNat; +import com.azure.resourcemanager.paloaltonetworks.models.EnabledDnsType; +import com.azure.resourcemanager.paloaltonetworks.models.EndpointConfiguration; +import com.azure.resourcemanager.paloaltonetworks.models.FrontendSetting; +import com.azure.resourcemanager.paloaltonetworks.models.IpAddress; +import com.azure.resourcemanager.paloaltonetworks.models.IpAddressSpace; +import com.azure.resourcemanager.paloaltonetworks.models.ManagedIdentityType; +import com.azure.resourcemanager.paloaltonetworks.models.MarketplaceDetails; +import com.azure.resourcemanager.paloaltonetworks.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.paloaltonetworks.models.NetworkProfile; +import com.azure.resourcemanager.paloaltonetworks.models.NetworkType; +import com.azure.resourcemanager.paloaltonetworks.models.PanoramaConfig; +import com.azure.resourcemanager.paloaltonetworks.models.PlanData; +import com.azure.resourcemanager.paloaltonetworks.models.ProtocolType; +import com.azure.resourcemanager.paloaltonetworks.models.RulestackDetails; +import com.azure.resourcemanager.paloaltonetworks.models.UsageType; +import com.azure.resourcemanager.paloaltonetworks.models.VnetConfiguration; +import com.azure.resourcemanager.paloaltonetworks.models.VwanConfiguration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Firewalls CreateOrUpdate. */ +public final class FirewallsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .define("firewall1") + .withRegion("eastus") + .withExistingResourceGroup("firewall-rg") + .withNetworkProfile( + new NetworkProfile() + .withVnetConfiguration( + new VnetConfiguration() + .withVnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet") + .withAddressSpace("10.1.0.0/16")) + .withTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withUnTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withIpOfTrustSubnetForUdr( + new IpAddress() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddress("10.1.1.0/24"))) + .withVwanConfiguration( + new VwanConfiguration() + .withNetworkVirtualApplianceId("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withVHub( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withUnTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withIpOfTrustSubnetForUdr( + new IpAddress() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddress("10.1.1.0/24"))) + .withNetworkType(NetworkType.VNET) + .withPublicIps( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1") + .withAddress("20.22.92.11"))) + .withEnableEgressNat(EgressNat.ENABLED) + .withEgressNatIp( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1") + .withAddress("20.22.92.111")))) + .withDnsSettings( + new DnsSettings() + .withEnableDnsProxy(DnsProxy.DISABLED) + .withEnabledDnsType(EnabledDnsType.CUSTOM) + .withDnsServers( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1") + .withAddress("20.22.92.111")))) + .withPlanData( + new PlanData() + .withUsageType(UsageType.PAYG) + .withBillingCycle(BillingCycle.MONTHLY) + .withPlanId("liftrpantestplan")) + .withMarketplaceDetails( + new MarketplaceDetails() + .withOfferId("liftr-pan-ame-test") + .withPublisherId("isvtestuklegacy") + .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START)) + .withTags(mapOf("tagName", "value")) + .withIdentity( + new AzureResourceManagerManagedIdentityProperties() + .withType(ManagedIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "key16", + new AzureResourceManagerUserAssignedIdentity() + .withClientId("aaaa") + .withPrincipalId("aaaaaaaaaaaaaaa")))) + .withPanEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withIsPanoramaManaged(BooleanEnum.TRUE) + .withPanoramaConfig(new PanoramaConfig().withConfigString("bas64EncodedString")) + .withAssociatedRulestack( + new RulestackDetails().withResourceId("lrs1").withRulestackId("PANRSID").withLocation("eastus")) + .withFrontEndSettings( + Arrays + .asList( + new FrontendSetting() + .withName("frontendsetting11") + .withProtocol(ProtocolType.TCP) + .withFrontendConfiguration( + new EndpointConfiguration() + .withPort("80") + .withAddress( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp1") + .withAddress("20.22.91.251"))) + .withBackendConfiguration( + new EndpointConfiguration() + .withPort("80") + .withAddress( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp2") + .withAddress("20.22.32.136"))))) + .create(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .define("firewall1") + .withRegion("eastus") + .withExistingResourceGroup("firewall-rg") + .withNetworkProfile( + new NetworkProfile() + .withNetworkType(NetworkType.VNET) + .withPublicIps( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1") + .withAddress("20.22.92.11"))) + .withEnableEgressNat(EgressNat.ENABLED)) + .withDnsSettings(new DnsSettings()) + .withPlanData(new PlanData().withBillingCycle(BillingCycle.MONTHLY).withPlanId("liftrpantestplan")) + .withMarketplaceDetails( + new MarketplaceDetails().withOfferId("liftr-pan-ame-test").withPublisherId("isvtestuklegacy")) + .create(); + } + + @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/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsDeleteSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsDeleteSamples.java new file mode 100644 index 000000000000..320d5844b4cf --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for Firewalls Delete. */ +public final class FirewallsDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().delete("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().delete("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetByResourceGroupSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..94b10d00475b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetByResourceGroupSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for Firewalls GetByResourceGroup. */ +public final class FirewallsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .getByResourceGroupWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .getByResourceGroupWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetGlobalRulestackSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetGlobalRulestackSamples.java new file mode 100644 index 000000000000..a085d534d6c1 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetGlobalRulestackSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for Firewalls GetGlobalRulestack. */ +public final class FirewallsGetGlobalRulestackSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getGlobalRulestack_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_getGlobalRulestack_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetGlobalRulestackMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .getGlobalRulestackWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getGlobalRulestack_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_getGlobalRulestack_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetGlobalRulestackMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .getGlobalRulestackWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetLogProfileSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetLogProfileSamples.java new file mode 100644 index 000000000000..6a7aa6a5ee6b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetLogProfileSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for Firewalls GetLogProfile. */ +public final class FirewallsGetLogProfileSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getLogProfile_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_getLogProfile_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetLogProfileMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().getLogProfileWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getLogProfile_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_getLogProfile_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetLogProfileMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().getLogProfileWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetSupportInfoSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetSupportInfoSamples.java new file mode 100644 index 000000000000..a356dbd0d236 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsGetSupportInfoSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for Firewalls GetSupportInfo. */ +public final class FirewallsGetSupportInfoSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getSupportInfo_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_getSupportInfo_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetSupportInfoMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .getSupportInfoWithResponse("rgopenapi", "firewall1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getSupportInfo_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_getSupportInfo_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsGetSupportInfoMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .getSupportInfoWithResponse("rgopenapi", "firewall1", "user1@domain.com", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsListByResourceGroupSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsListByResourceGroupSamples.java new file mode 100644 index 000000000000..e4021cb08485 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsListByResourceGroupSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for Firewalls ListByResourceGroup. */ +public final class FirewallsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().listByResourceGroup("firewall-rg", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_ListByResourceGroup_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsListByResourceGroupMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().listByResourceGroup("firewall-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsListSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsListSamples.java new file mode 100644 index 000000000000..d9d36e89cb9f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for Firewalls List. */ +public final class FirewallsListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_ListBySubscription_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsListBySubscriptionMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.firewalls().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsSaveLogProfileSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsSaveLogProfileSamples.java new file mode 100644 index 000000000000..99f20c85d471 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsSaveLogProfileSamples.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.LogSettingsInner; +import com.azure.resourcemanager.paloaltonetworks.models.ApplicationInsights; +import com.azure.resourcemanager.paloaltonetworks.models.EventHub; +import com.azure.resourcemanager.paloaltonetworks.models.LogDestination; +import com.azure.resourcemanager.paloaltonetworks.models.LogOption; +import com.azure.resourcemanager.paloaltonetworks.models.LogType; +import com.azure.resourcemanager.paloaltonetworks.models.MonitorLog; +import com.azure.resourcemanager.paloaltonetworks.models.StorageAccount; + +/** Samples for Firewalls SaveLogProfile. */ +public final class FirewallsSaveLogProfileSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_saveLogProfile_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_saveLogProfile_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsSaveLogProfileMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .saveLogProfileWithResponse( + "firewall-rg", + "firewall1", + new LogSettingsInner() + .withLogType(LogType.TRAFFIC) + .withLogOption(LogOption.SAME_DESTINATION) + .withApplicationInsights( + new ApplicationInsights().withId("aaaaaaaaaaaaaaaa").withKey("fakeTokenPlaceholder")) + .withCommonDestination( + new LogDestination() + .withStorageConfigurations( + new StorageAccount() + .withId("aaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaa") + .withAccountName("aaaaaaaaaaaaaaaaaaaaaaa")) + .withEventHubConfigurations( + new EventHub() + .withId("aaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaa") + .withName("aaaaaaaa") + .withNameSpace("aaaaaaaaaaaaaaaaaaaaa") + .withPolicyName("aaaaaaaaaaaa")) + .withMonitorConfigurations( + new MonitorLog() + .withId("aaaaaaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaaaaa") + .withWorkspace("aaaaaaaaaaa") + .withPrimaryKey("fakeTokenPlaceholder") + .withSecondaryKey("fakeTokenPlaceholder"))) + .withTrafficLogDestination( + new LogDestination() + .withStorageConfigurations( + new StorageAccount() + .withId("aaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaa") + .withAccountName("aaaaaaaaaaaaaaaaaaaaaaa")) + .withEventHubConfigurations( + new EventHub() + .withId("aaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaa") + .withName("aaaaaaaa") + .withNameSpace("aaaaaaaaaaaaaaaaaaaaa") + .withPolicyName("aaaaaaaaaaaa")) + .withMonitorConfigurations( + new MonitorLog() + .withId("aaaaaaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaaaaa") + .withWorkspace("aaaaaaaaaaa") + .withPrimaryKey("fakeTokenPlaceholder") + .withSecondaryKey("fakeTokenPlaceholder"))) + .withThreatLogDestination( + new LogDestination() + .withStorageConfigurations( + new StorageAccount() + .withId("aaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaa") + .withAccountName("aaaaaaaaaaaaaaaaaaaaaaa")) + .withEventHubConfigurations( + new EventHub() + .withId("aaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaa") + .withName("aaaaaaaa") + .withNameSpace("aaaaaaaaaaaaaaaaaaaaa") + .withPolicyName("aaaaaaaaaaaa")) + .withMonitorConfigurations( + new MonitorLog() + .withId("aaaaaaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaaaaa") + .withWorkspace("aaaaaaaaaaa") + .withPrimaryKey("fakeTokenPlaceholder") + .withSecondaryKey("fakeTokenPlaceholder"))) + .withDecryptLogDestination( + new LogDestination() + .withStorageConfigurations( + new StorageAccount() + .withId("aaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaa") + .withAccountName("aaaaaaaaaaaaaaaaaaaaaaa")) + .withEventHubConfigurations( + new EventHub() + .withId("aaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaa") + .withName("aaaaaaaa") + .withNameSpace("aaaaaaaaaaaaaaaaaaaaa") + .withPolicyName("aaaaaaaaaaaa")) + .withMonitorConfigurations( + new MonitorLog() + .withId("aaaaaaaaaaaaaaaaaaa") + .withSubscriptionId("aaaaaaaaaaaaa") + .withWorkspace("aaaaaaaaaaa") + .withPrimaryKey("fakeTokenPlaceholder") + .withSecondaryKey("fakeTokenPlaceholder"))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_saveLogProfile_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_saveLogProfile_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsSaveLogProfileMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .firewalls() + .saveLogProfileWithResponse("firewall-rg", "firewall1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsUpdateSamples.java new file mode 100644 index 000000000000..656bd1d2782f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FirewallsUpdateSamples.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerUserAssignedIdentity; +import com.azure.resourcemanager.paloaltonetworks.models.BillingCycle; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DnsProxy; +import com.azure.resourcemanager.paloaltonetworks.models.DnsSettings; +import com.azure.resourcemanager.paloaltonetworks.models.EgressNat; +import com.azure.resourcemanager.paloaltonetworks.models.EnabledDnsType; +import com.azure.resourcemanager.paloaltonetworks.models.EndpointConfiguration; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallResource; +import com.azure.resourcemanager.paloaltonetworks.models.FirewallResourceUpdateProperties; +import com.azure.resourcemanager.paloaltonetworks.models.FrontendSetting; +import com.azure.resourcemanager.paloaltonetworks.models.IpAddress; +import com.azure.resourcemanager.paloaltonetworks.models.IpAddressSpace; +import com.azure.resourcemanager.paloaltonetworks.models.ManagedIdentityType; +import com.azure.resourcemanager.paloaltonetworks.models.MarketplaceDetails; +import com.azure.resourcemanager.paloaltonetworks.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.paloaltonetworks.models.NetworkProfile; +import com.azure.resourcemanager.paloaltonetworks.models.NetworkType; +import com.azure.resourcemanager.paloaltonetworks.models.PanoramaConfig; +import com.azure.resourcemanager.paloaltonetworks.models.PlanData; +import com.azure.resourcemanager.paloaltonetworks.models.ProtocolType; +import com.azure.resourcemanager.paloaltonetworks.models.RulestackDetails; +import com.azure.resourcemanager.paloaltonetworks.models.UsageType; +import com.azure.resourcemanager.paloaltonetworks.models.VnetConfiguration; +import com.azure.resourcemanager.paloaltonetworks.models.VwanConfiguration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Firewalls Update. */ +public final class FirewallsUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Update_MinimumSet_Gen.json + */ + /** + * Sample code: Firewalls_Update_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + FirewallResource resource = + manager + .firewalls() + .getByResourceGroupWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Firewalls_Update_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void firewallsUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + FirewallResource resource = + manager + .firewalls() + .getByResourceGroupWithResponse("firewall-rg", "firewall1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("tagName", "value")) + .withIdentity( + new AzureResourceManagerManagedIdentityProperties() + .withType(ManagedIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "key16", + new AzureResourceManagerUserAssignedIdentity() + .withClientId("aaaa") + .withPrincipalId("aaaaaaaaaaaaaaa")))) + .withProperties( + new FirewallResourceUpdateProperties() + .withPanEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withNetworkProfile( + new NetworkProfile() + .withVnetConfiguration( + new VnetConfiguration() + .withVnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet") + .withAddressSpace("10.1.0.0/16")) + .withTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withUnTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withIpOfTrustSubnetForUdr( + new IpAddress() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddress("10.1.1.0/24"))) + .withVwanConfiguration( + new VwanConfiguration() + .withNetworkVirtualApplianceId("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withVHub( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withUnTrustSubnet( + new IpAddressSpace() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddressSpace("10.1.1.0/24")) + .withIpOfTrustSubnetForUdr( + new IpAddress() + .withResourceId( + "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet") + .withAddress("10.1.1.0/24"))) + .withNetworkType(NetworkType.VNET) + .withPublicIps( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1") + .withAddress("20.22.92.11"))) + .withEnableEgressNat(EgressNat.ENABLED) + .withEgressNatIp( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1") + .withAddress("20.22.92.111")))) + .withIsPanoramaManaged(BooleanEnum.TRUE) + .withPanoramaConfig(new PanoramaConfig().withConfigString("bas64EncodedString")) + .withAssociatedRulestack( + new RulestackDetails() + .withResourceId("aaaaaaaaaa") + .withRulestackId("aaaaaaaaaaaaaaaa") + .withLocation("eastus")) + .withDnsSettings( + new DnsSettings() + .withEnableDnsProxy(DnsProxy.DISABLED) + .withEnabledDnsType(EnabledDnsType.CUSTOM) + .withDnsServers( + Arrays + .asList( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1") + .withAddress("20.22.92.111")))) + .withFrontEndSettings( + Arrays + .asList( + new FrontendSetting() + .withName("frontendsetting11") + .withProtocol(ProtocolType.TCP) + .withFrontendConfiguration( + new EndpointConfiguration() + .withPort("80") + .withAddress( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp1") + .withAddress("20.22.91.251"))) + .withBackendConfiguration( + new EndpointConfiguration() + .withPort("80") + .withAddress( + new IpAddress() + .withResourceId( + "/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp2") + .withAddress("20.22.32.136"))))) + .withPlanData( + new PlanData() + .withUsageType(UsageType.PAYG) + .withBillingCycle(BillingCycle.WEEKLY) + .withPlanId("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")) + .withMarketplaceDetails( + new MarketplaceDetails() + .withOfferId("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + .withPublisherId("aaaa") + .withMarketplaceSubscriptionStatus( + MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START))) + .apply(); + } + + @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/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackCreateOrUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackCreateOrUpdateSamples.java new file mode 100644 index 000000000000..eba9153432ee --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackCreateOrUpdateSamples.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.FqdnListGlobalRulestackResourceInner; +import java.util.Arrays; + +/** Samples for FqdnListGlobalRulestack CreateOrUpdate. */ +public final class FqdnListGlobalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .fqdnListGlobalRulestacks() + .createOrUpdate( + "praval", + "armid1", + new FqdnListGlobalRulestackResourceInner() + .withDescription("string") + .withFqdnList(Arrays.asList("string1", "string2")) + .withEtag("aaaaaaaaaaaaaaaaaa") + .withAuditComment("string"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .fqdnListGlobalRulestacks() + .createOrUpdate( + "praval", + "armid1", + new FqdnListGlobalRulestackResourceInner().withFqdnList(Arrays.asList("string1", "string2")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackDeleteSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackDeleteSamples.java new file mode 100644 index 000000000000..e8a1708e8a7c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for FqdnListGlobalRulestack Delete. */ +public final class FqdnListGlobalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListGlobalRulestacks().delete("praval", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListGlobalRulestacks().delete("praval", "armid1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackGetSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackGetSamples.java new file mode 100644 index 000000000000..67618e603598 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackGetSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for FqdnListGlobalRulestack Get. */ +public final class FqdnListGlobalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListGlobalRulestacks().getWithResponse("praval", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListGlobalRulestacks().getWithResponse("praval", "armid1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackListSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackListSamples.java new file mode 100644 index 000000000000..997638b5b417 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListGlobalRulestackListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for FqdnListGlobalRulestack List. */ +public final class FqdnListGlobalRulestackListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_List_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListGlobalRulestacks().list("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_List_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListGlobalRulestack_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListGlobalRulestackListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListGlobalRulestacks().list("praval", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackCreateOrUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackCreateOrUpdateSamples.java new file mode 100644 index 000000000000..1d915ece316d --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackCreateOrUpdateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import java.util.Arrays; + +/** Samples for FqdnListLocalRulestack CreateOrUpdate. */ +public final class FqdnListLocalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .fqdnListLocalRulestacks() + .define("armid1") + .withExistingLocalRulestack("rgopenapi", "lrs1") + .withFqdnList(Arrays.asList("string1", "string2")) + .withDescription("string") + .withEtag("aaaaaaaaaaaaaaaaaa") + .withAuditComment("string") + .create(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .fqdnListLocalRulestacks() + .define("armid1") + .withExistingLocalRulestack("rgopenapi", "lrs1") + .withFqdnList(Arrays.asList("string1", "string2")) + .create(); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackDeleteSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackDeleteSamples.java new file mode 100644 index 000000000000..3a6c25de226d --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for FqdnListLocalRulestack Delete. */ +public final class FqdnListLocalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListLocalRulestacks().delete("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListLocalRulestacks().delete("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackGetSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackGetSamples.java new file mode 100644 index 000000000000..cfa303f5418b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackGetSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for FqdnListLocalRulestack Get. */ +public final class FqdnListLocalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .fqdnListLocalRulestacks() + .getWithResponse("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .fqdnListLocalRulestacks() + .getWithResponse("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackListByLocalRulestacksSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackListByLocalRulestacksSamples.java new file mode 100644 index 000000000000..3e35bfc1619a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/FqdnListLocalRulestackListByLocalRulestacksSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for FqdnListLocalRulestack ListByLocalRulestacks. */ +public final class FqdnListLocalRulestackListByLocalRulestacksSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackListByLocalRulestacksMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListLocalRulestacks().listByLocalRulestacks("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen.json + */ + /** + * Sample code: FqdnListLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void fqdnListLocalRulestackListByLocalRulestacksMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.fqdnListLocalRulestacks().listByLocalRulestacks("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackCommitSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackCommitSamples.java new file mode 100644 index 000000000000..565171f36818 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackCommitSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for GlobalRulestack Commit. */ +public final class GlobalRulestackCommitSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_commit_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_commit_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackCommitMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().commit("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_commit_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_commit_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackCommitMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().commit("praval", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackCreateOrUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackCreateOrUpdateSamples.java new file mode 100644 index 000000000000..3bb7c4603dc7 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackCreateOrUpdateSamples.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.GlobalRulestackResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerUserAssignedIdentity; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.ManagedIdentityType; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for GlobalRulestack CreateOrUpdate. */ +public final class GlobalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .createOrUpdate( + "praval", new GlobalRulestackResourceInner().withLocation("eastus"), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .createOrUpdate( + "praval", + new GlobalRulestackResourceInner() + .withLocation("eastus") + .withIdentity( + new AzureResourceManagerManagedIdentityProperties() + .withType(ManagedIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "key16", + new AzureResourceManagerUserAssignedIdentity() + .withClientId("aaaa") + .withPrincipalId("aaaaaaaaaaaaaaa")))) + .withPanEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withPanLocation("eastus") + .withScope(ScopeType.GLOBAL) + .withAssociatedSubscriptions(Arrays.asList("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")) + .withDescription("global rulestacks") + .withDefaultMode(DefaultMode.IPS) + .withMinAppIdVersion("8.5.3") + .withSecurityServices( + new SecurityServices() + .withVulnerabilityProfile("default") + .withAntiSpywareProfile("default") + .withAntiVirusProfile("default") + .withUrlFilteringProfile("default") + .withFileBlockingProfile("default") + .withDnsSubscription("default") + .withOutboundUnTrustCertificate("default") + .withOutboundTrustCertificate("default")), + com.azure.core.util.Context.NONE); + } + + @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/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackDeleteSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackDeleteSamples.java new file mode 100644 index 000000000000..be273d077a33 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for GlobalRulestack Delete. */ +public final class GlobalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().delete("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().delete("praval", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackGetChangeLogSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackGetChangeLogSamples.java new file mode 100644 index 000000000000..117790e546f3 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackGetChangeLogSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for GlobalRulestack GetChangeLog. */ +public final class GlobalRulestackGetChangeLogSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_getChangeLog_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_getChangeLog_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackGetChangeLogMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().getChangeLogWithResponse("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_getChangeLog_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_getChangeLog_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackGetChangeLogMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().getChangeLogWithResponse("praval", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackGetSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackGetSamples.java new file mode 100644 index 000000000000..57444f781822 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackGetSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for GlobalRulestack Get. */ +public final class GlobalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().getWithResponse("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().getWithResponse("praval", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListAdvancedSecurityObjectsSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListAdvancedSecurityObjectsSamples.java new file mode 100644 index 000000000000..dc318e77cc75 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListAdvancedSecurityObjectsSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectTypeEnum; + +/** Samples for GlobalRulestack ListAdvancedSecurityObjects. */ +public final class GlobalRulestackListAdvancedSecurityObjectsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listAdvancedSecurityObjects_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listAdvancedSecurityObjects_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListAdvancedSecurityObjectsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listAdvancedSecurityObjectsWithResponse( + "praval", + AdvSecurityObjectTypeEnum.fromString("globalRulestacks"), + "a6a321", + 20, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listAdvancedSecurityObjects_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listAdvancedSecurityObjects_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListAdvancedSecurityObjectsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listAdvancedSecurityObjectsWithResponse( + "praval", + AdvSecurityObjectTypeEnum.fromString("globalRulestacks"), + null, + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListAppIdsSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListAppIdsSamples.java new file mode 100644 index 000000000000..98e4bfeb7664 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListAppIdsSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for GlobalRulestack ListAppIds. */ +public final class GlobalRulestackListAppIdsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listAppIds_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listAppIds_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListAppIdsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listAppIdsWithResponse("praval", "8543", "pref", "a6a321", 20, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listAppIds_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listAppIds_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListAppIdsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listAppIdsWithResponse("praval", null, null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListCountriesSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListCountriesSamples.java new file mode 100644 index 000000000000..06e5b586674a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListCountriesSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for GlobalRulestack ListCountries. */ +public final class GlobalRulestackListCountriesSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listCountries_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listCountries_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListCountriesMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().listCountriesWithResponse("praval", null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listCountries_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listCountries_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListCountriesMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().listCountriesWithResponse("praval", "a6a321", 20, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListFirewallsSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListFirewallsSamples.java new file mode 100644 index 000000000000..2b0bccf805fc --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListFirewallsSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for GlobalRulestack ListFirewalls. */ +public final class GlobalRulestackListFirewallsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listFirewalls_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listFirewalls_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListFirewallsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().listFirewallsWithResponse("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listFirewalls_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listFirewalls_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListFirewallsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().listFirewallsWithResponse("praval", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListPredefinedUrlCategoriesSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListPredefinedUrlCategoriesSamples.java new file mode 100644 index 000000000000..fcca3cfc0b62 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListPredefinedUrlCategoriesSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for GlobalRulestack ListPredefinedUrlCategories. */ +public final class GlobalRulestackListPredefinedUrlCategoriesSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listPredefinedUrlCategories_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listPredefinedUrlCategories_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListPredefinedUrlCategoriesMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listPredefinedUrlCategoriesWithResponse("praval", "a6a321", 20, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listPredefinedUrlCategories_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listPredefinedUrlCategories_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListPredefinedUrlCategoriesMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listPredefinedUrlCategoriesWithResponse("praval", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListSamples.java new file mode 100644 index 000000000000..90ffe62c226c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for GlobalRulestack List. */ +public final class GlobalRulestackListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_List_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_List_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListSecurityServicesSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListSecurityServicesSamples.java new file mode 100644 index 000000000000..b38fe4d12714 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackListSecurityServicesSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesTypeEnum; + +/** Samples for GlobalRulestack ListSecurityServices. */ +public final class GlobalRulestackListSecurityServicesSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listSecurityServices_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listSecurityServices_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListSecurityServicesMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listSecurityServicesWithResponse( + "praval", + SecurityServicesTypeEnum.fromString("globalRulestacks"), + null, + null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listSecurityServices_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_listSecurityServices_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackListSecurityServicesMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .listSecurityServicesWithResponse( + "praval", + SecurityServicesTypeEnum.fromString("globalRulestacks"), + "a6a321", + 20, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackRevertSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackRevertSamples.java new file mode 100644 index 000000000000..defaefdc5620 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackRevertSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for GlobalRulestack Revert. */ +public final class GlobalRulestackRevertSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_revert_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_revert_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackRevertMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().revertWithResponse("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_revert_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_revert_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackRevertMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.globalRulestacks().revertWithResponse("praval", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackUpdateSamples.java new file mode 100644 index 000000000000..d67d5cc5a48b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/GlobalRulestackUpdateSamples.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerUserAssignedIdentity; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackResourceUpdate; +import com.azure.resourcemanager.paloaltonetworks.models.GlobalRulestackResourceUpdateProperties; +import com.azure.resourcemanager.paloaltonetworks.models.ManagedIdentityType; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for GlobalRulestack Update. */ +public final class GlobalRulestackUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Update_MaximumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_Update_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .updateWithResponse( + "praval", + new GlobalRulestackResourceUpdate() + .withLocation("eastus") + .withIdentity( + new AzureResourceManagerManagedIdentityProperties() + .withType(ManagedIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "key16", + new AzureResourceManagerUserAssignedIdentity() + .withClientId("aaaa") + .withPrincipalId("aaaaaaaaaaaaaaa")))) + .withProperties( + new GlobalRulestackResourceUpdateProperties() + .withPanEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withPanLocation("eastus") + .withScope(ScopeType.GLOBAL) + .withAssociatedSubscriptions(Arrays.asList("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")) + .withDescription("global rulestacks") + .withDefaultMode(DefaultMode.IPS) + .withMinAppIdVersion("8.5.3") + .withSecurityServices( + new SecurityServices() + .withVulnerabilityProfile("default") + .withAntiSpywareProfile("default") + .withAntiVirusProfile("default") + .withUrlFilteringProfile("default") + .withFileBlockingProfile("default") + .withDnsSubscription("default") + .withOutboundUnTrustCertificate("default") + .withOutboundTrustCertificate("default"))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Update_MinimumSet_Gen.json + */ + /** + * Sample code: GlobalRulestack_Update_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void globalRulestackUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .globalRulestacks() + .updateWithResponse("praval", new GlobalRulestackResourceUpdate(), com.azure.core.util.Context.NONE); + } + + @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/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesCreateOrUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..f379c72321ad --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesCreateOrUpdateSamples.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import java.util.Arrays; + +/** Samples for LocalRules CreateOrUpdate. */ +public final class LocalRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .define("1") + .withExistingLocalRulestack("firewall-rg", "lrs1") + .withRuleName("localRule1") + .create(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .define("1") + .withExistingLocalRulestack("firewall-rg", "lrs1") + .withRuleName("localRule1") + .withTags(Arrays.asList(new TagInfo().withKey("fakeTokenPlaceholder").withValue("value"))) + .withEtag("c18e6eef-ba3e-49ee-8a85-2b36c863a9d0") + .withDescription("description of local rule") + .withRuleState(StateEnum.DISABLED) + .withSource( + new SourceAddr() + .withCidrs(Arrays.asList("1.0.0.1/10")) + .withCountries(Arrays.asList("India")) + .withFeeds(Arrays.asList("feed")) + .withPrefixLists(Arrays.asList("PL1"))) + .withNegateSource(BooleanEnum.TRUE) + .withDestination( + new DestinationAddr() + .withCidrs(Arrays.asList("1.0.0.1/10")) + .withCountries(Arrays.asList("India")) + .withFeeds(Arrays.asList("feed")) + .withPrefixLists(Arrays.asList("PL1")) + .withFqdnLists(Arrays.asList("FQDN1"))) + .withNegateDestination(BooleanEnum.TRUE) + .withApplications(Arrays.asList("app1")) + .withCategory( + new Category().withUrlCustom(Arrays.asList("https://microsoft.com")).withFeeds(Arrays.asList("feed"))) + .withProtocol("HTTP") + .withProtocolPortList(Arrays.asList("80")) + .withInboundInspectionCertificate("cert1") + .withAuditComment("example comment") + .withActionType(ActionEnum.ALLOW) + .withEnableLogging(StateEnum.DISABLED) + .withDecryptionRuleType(DecryptionRuleTypeEnum.SSLOUTBOUND_INSPECTION) + .create(); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesDeleteSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesDeleteSamples.java new file mode 100644 index 000000000000..7131d71af18a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRules Delete. */ +public final class LocalRulesDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRules().delete("firewall-rg", "lrs1", "1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRules().delete("firewall-rg", "lrs1", "1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesGetCountersSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesGetCountersSamples.java new file mode 100644 index 000000000000..e08a4604bafe --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesGetCountersSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRules GetCounters. */ +public final class LocalRulesGetCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_getCounters_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_getCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesGetCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .getCountersWithResponse("firewall-rg", "lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_getCounters_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_getCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesGetCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .getCountersWithResponse("firewall-rg", "lrs1", "1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesGetSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesGetSamples.java new file mode 100644 index 000000000000..f21bae53c51e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesGetSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRules Get. */ +public final class LocalRulesGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_Get_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRules().getWithResponse("firewall-rg", "lrs1", "1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_Get_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRules().getWithResponse("firewall-rg", "lrs1", "1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesListByLocalRulestacksSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesListByLocalRulestacksSamples.java new file mode 100644 index 000000000000..2cfae54f58c7 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesListByLocalRulestacksSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRules ListByLocalRulestacks. */ +public final class LocalRulesListByLocalRulestacksSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_ListByLocalRulestacks_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_ListByLocalRulestacks_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesListByLocalRulestacksMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRules().listByLocalRulestacks("firewall-rg", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_ListByLocalRulestacks_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_ListByLocalRulestacks_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesListByLocalRulestacksMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRules().listByLocalRulestacks("firewall-rg", "lrs1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesRefreshCountersSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesRefreshCountersSamples.java new file mode 100644 index 000000000000..31baa9724374 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesRefreshCountersSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRules RefreshCounters. */ +public final class LocalRulesRefreshCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_refreshCounters_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_refreshCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesRefreshCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .refreshCountersWithResponse("firewall-rg", "lrs1", "1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_refreshCounters_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_refreshCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesRefreshCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .refreshCountersWithResponse("firewall-rg", "lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesResetCountersSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesResetCountersSamples.java new file mode 100644 index 000000000000..5c1acfd07ee4 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulesResetCountersSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRules ResetCounters. */ +public final class LocalRulesResetCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_resetCounters_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRules_resetCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesResetCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .resetCountersWithResponse("firewall-rg", "lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_resetCounters_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRules_resetCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulesResetCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRules() + .resetCountersWithResponse("firewall-rg", "lrs1", "1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksCommitSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksCommitSamples.java new file mode 100644 index 000000000000..a30324f7fb37 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksCommitSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRulestacks Commit. */ +public final class LocalRulestacksCommitSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_commit_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_commit_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksCommitMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().commit("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_commit_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_commit_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksCommitMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().commit("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksCreateOrUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksCreateOrUpdateSamples.java new file mode 100644 index 000000000000..d670a6d7a933 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksCreateOrUpdateSamples.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerUserAssignedIdentity; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.ManagedIdentityType; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for LocalRulestacks CreateOrUpdate. */ +public final class LocalRulestacksCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().define("lrs1").withRegion("eastus").withExistingResourceGroup("rgopenapi").create(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .define("lrs1") + .withRegion("eastus") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("tagName", "value")) + .withIdentity( + new AzureResourceManagerManagedIdentityProperties() + .withType(ManagedIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "key16", + new AzureResourceManagerUserAssignedIdentity() + .withClientId("aaaa") + .withPrincipalId("aaaaaaaaaaaaaaa")))) + .withPanEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withPanLocation("eastus") + .withScope(ScopeType.LOCAL) + .withAssociatedSubscriptions(Arrays.asList("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")) + .withDescription("local rulestacks") + .withDefaultMode(DefaultMode.IPS) + .withMinAppIdVersion("8.5.3") + .withSecurityServices( + new SecurityServices() + .withVulnerabilityProfile("default") + .withAntiSpywareProfile("default") + .withAntiVirusProfile("default") + .withUrlFilteringProfile("default") + .withFileBlockingProfile("default") + .withDnsSubscription("default") + .withOutboundUnTrustCertificate("default") + .withOutboundTrustCertificate("default")) + .create(); + } + + @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/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksDeleteSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksDeleteSamples.java new file mode 100644 index 000000000000..718ac736ba81 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRulestacks Delete. */ +public final class LocalRulestacksDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().delete("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().delete("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksGetByResourceGroupSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksGetByResourceGroupSamples.java new file mode 100644 index 000000000000..8cd0b7fd530b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksGetByResourceGroupSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRulestacks GetByResourceGroup. */ +public final class LocalRulestacksGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Get_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().getByResourceGroupWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Get_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().getByResourceGroupWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksGetChangeLogSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksGetChangeLogSamples.java new file mode 100644 index 000000000000..79a2f562a91f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksGetChangeLogSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRulestacks GetChangeLog. */ +public final class LocalRulestacksGetChangeLogSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_getChangeLog_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_getChangeLog_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksGetChangeLogMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().getChangeLogWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_getChangeLog_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_getChangeLog_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksGetChangeLogMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().getChangeLogWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksGetSupportInfoSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksGetSupportInfoSamples.java new file mode 100644 index 000000000000..fa63bc1bede8 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksGetSupportInfoSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRulestacks GetSupportInfo. */ +public final class LocalRulestacksGetSupportInfoSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_getSupportInfo_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_getSupportInfo_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksGetSupportInfoMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .getSupportInfoWithResponse("rgopenapi", "lrs1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_getSupportInfo_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_getSupportInfo_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksGetSupportInfoMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .getSupportInfoWithResponse("rgopenapi", "lrs1", "user1@domain.com", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListAdvancedSecurityObjectsSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListAdvancedSecurityObjectsSamples.java new file mode 100644 index 000000000000..8253677cdbaa --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListAdvancedSecurityObjectsSamples.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.models.AdvSecurityObjectTypeEnum; + +/** Samples for LocalRulestacks ListAdvancedSecurityObjects. */ +public final class LocalRulestacksListAdvancedSecurityObjectsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listAdvancedSecurityObjects_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listAdvancedSecurityObjects_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListAdvancedSecurityObjectsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listAdvancedSecurityObjectsWithResponse( + "rgopenapi", + "lrs1", + AdvSecurityObjectTypeEnum.fromString("localRulestacks"), + "a6a321", + 20, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listAdvancedSecurityObjects_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listAdvancedSecurityObjects_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListAdvancedSecurityObjectsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listAdvancedSecurityObjectsWithResponse( + "rgopenapi", + "lrs1", + AdvSecurityObjectTypeEnum.fromString("localRulestacks"), + null, + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListAppIdsSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListAppIdsSamples.java new file mode 100644 index 000000000000..8d8ccb2d78df --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListAppIdsSamples.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRulestacks ListAppIds. */ +public final class LocalRulestacksListAppIdsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listAppIds_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listAppIds_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListAppIdsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listAppIdsWithResponse( + "rgopenapi", "lrs1", "8543", "pref", "a6a321", 20, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listAppIds_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listAppIds_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListAppIdsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listAppIdsWithResponse("rgopenapi", "lrs1", null, null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListByResourceGroupSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListByResourceGroupSamples.java new file mode 100644 index 000000000000..7b9c8c005e00 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListByResourceGroupSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRulestacks ListByResourceGroup. */ +public final class LocalRulestacksListByResourceGroupSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_ListByResourceGroup_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListByResourceGroupMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListCountriesSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListCountriesSamples.java new file mode 100644 index 000000000000..47f9dee00aee --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListCountriesSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRulestacks ListCountries. */ +public final class LocalRulestacksListCountriesSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listCountries_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listCountries_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListCountriesMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listCountriesWithResponse("rgopenapi", "lrs1", "a6a321", 20, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listCountries_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listCountries_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListCountriesMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listCountriesWithResponse("rgopenapi", "lrs1", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListFirewallsSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListFirewallsSamples.java new file mode 100644 index 000000000000..4ef9597e6e67 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListFirewallsSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRulestacks ListFirewalls. */ +public final class LocalRulestacksListFirewallsSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listFirewalls_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listFirewalls_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListFirewallsMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().listFirewallsWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listFirewalls_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listFirewalls_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListFirewallsMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().listFirewallsWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListPredefinedUrlCategoriesSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListPredefinedUrlCategoriesSamples.java new file mode 100644 index 000000000000..22f493012db7 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListPredefinedUrlCategoriesSamples.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRulestacks ListPredefinedUrlCategories. */ +public final class LocalRulestacksListPredefinedUrlCategoriesSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listPredefinedUrlCategories_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listPredefinedUrlCategories_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListPredefinedUrlCategoriesMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listPredefinedUrlCategoriesWithResponse("rgopenapi", "lrs1", null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listPredefinedUrlCategories_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listPredefinedUrlCategories_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListPredefinedUrlCategoriesMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listPredefinedUrlCategoriesWithResponse( + "rgopenapi", "lrs1", "a6a321", 20, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListSamples.java new file mode 100644 index 000000000000..6145886c680a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRulestacks List. */ +public final class LocalRulestacksListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_ListBySubscription_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListBySubscriptionMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListSecurityServicesSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListSecurityServicesSamples.java new file mode 100644 index 000000000000..346e274f36b6 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksListSecurityServicesSamples.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServicesTypeEnum; + +/** Samples for LocalRulestacks ListSecurityServices. */ +public final class LocalRulestacksListSecurityServicesSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listSecurityServices_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listSecurityServices_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListSecurityServicesMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listSecurityServicesWithResponse( + "rgopenapi", + "lrs1", + SecurityServicesTypeEnum.fromString("localRulestacks"), + null, + null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listSecurityServices_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_listSecurityServices_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksListSecurityServicesMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .localRulestacks() + .listSecurityServicesWithResponse( + "rgopenapi", + "lrs1", + SecurityServicesTypeEnum.fromString("localRulestacks"), + "a6a321", + 20, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksRevertSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksRevertSamples.java new file mode 100644 index 000000000000..96babf65d28b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksRevertSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for LocalRulestacks Revert. */ +public final class LocalRulestacksRevertSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_revert_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_revert_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksRevertMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().revertWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_revert_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_revert_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksRevertMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.localRulestacks().revertWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksUpdateSamples.java new file mode 100644 index 000000000000..2d582a2409e5 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/LocalRulestacksUpdateSamples.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerManagedIdentityProperties; +import com.azure.resourcemanager.paloaltonetworks.models.AzureResourceManagerUserAssignedIdentity; +import com.azure.resourcemanager.paloaltonetworks.models.DefaultMode; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestackResource; +import com.azure.resourcemanager.paloaltonetworks.models.LocalRulestackResourceUpdateProperties; +import com.azure.resourcemanager.paloaltonetworks.models.ManagedIdentityType; +import com.azure.resourcemanager.paloaltonetworks.models.ScopeType; +import com.azure.resourcemanager.paloaltonetworks.models.SecurityServices; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for LocalRulestacks Update. */ +public final class LocalRulestacksUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Update_MaximumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_Update_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + LocalRulestackResource resource = + manager + .localRulestacks() + .getByResourceGroupWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("tagName", "value")) + .withIdentity( + new AzureResourceManagerManagedIdentityProperties() + .withType(ManagedIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "key16", + new AzureResourceManagerUserAssignedIdentity() + .withClientId("aaaa") + .withPrincipalId("aaaaaaaaaaaaaaa")))) + .withProperties( + new LocalRulestackResourceUpdateProperties() + .withPanEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c12") + .withPanLocation("eastus") + .withScope(ScopeType.LOCAL) + .withAssociatedSubscriptions(Arrays.asList("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")) + .withDescription("local rulestacks") + .withDefaultMode(DefaultMode.IPS) + .withMinAppIdVersion("8.5.3") + .withSecurityServices( + new SecurityServices() + .withVulnerabilityProfile("default") + .withAntiSpywareProfile("default") + .withAntiVirusProfile("default") + .withUrlFilteringProfile("default") + .withFileBlockingProfile("default") + .withDnsSubscription("default") + .withOutboundUnTrustCertificate("default") + .withOutboundTrustCertificate("default"))) + .apply(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Update_MinimumSet_Gen.json + */ + /** + * Sample code: LocalRulestacks_Update_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void localRulestacksUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + LocalRulestackResource resource = + manager + .localRulestacks() + .getByResourceGroupWithResponse("rgopenapi", "lrs1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + @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/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/OperationsListSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/OperationsListSamples.java new file mode 100644 index 000000000000..f4e38394b2f3 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/OperationsListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Operations_List_MinimumSet_Gen.json + */ + /** + * Sample code: Operations_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void operationsListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Operations_List_MaximumSet_Gen.json + */ + /** + * Sample code: Operations_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void operationsListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesCreateOrUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..15021a932d0f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesCreateOrUpdateSamples.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PostRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import java.util.Arrays; + +/** Samples for PostRules CreateOrUpdate. */ +public final class PostRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .postRules() + .createOrUpdate( + "lrs1", + "1", + new PostRulesResourceInner() + .withEtag("c18e6eef-ba3e-49ee-8a85-2b36c863a9d0") + .withRuleName("postRule1") + .withDescription("description of post rule") + .withRuleState(StateEnum.DISABLED) + .withSource( + new SourceAddr() + .withCidrs(Arrays.asList("1.0.0.1/10")) + .withCountries(Arrays.asList("India")) + .withFeeds(Arrays.asList("feed")) + .withPrefixLists(Arrays.asList("PL1"))) + .withNegateSource(BooleanEnum.TRUE) + .withDestination( + new DestinationAddr() + .withCidrs(Arrays.asList("1.0.0.1/10")) + .withCountries(Arrays.asList("India")) + .withFeeds(Arrays.asList("feed")) + .withPrefixLists(Arrays.asList("PL1")) + .withFqdnLists(Arrays.asList("FQDN1"))) + .withNegateDestination(BooleanEnum.TRUE) + .withApplications(Arrays.asList("app1")) + .withCategory( + new Category() + .withUrlCustom(Arrays.asList("https://microsoft.com")) + .withFeeds(Arrays.asList("feed"))) + .withProtocol("HTTP") + .withProtocolPortList(Arrays.asList("80")) + .withInboundInspectionCertificate("cert1") + .withAuditComment("example comment") + .withActionType(ActionEnum.ALLOW) + .withEnableLogging(StateEnum.DISABLED) + .withDecryptionRuleType(DecryptionRuleTypeEnum.SSLOUTBOUND_INSPECTION) + .withTags(Arrays.asList(new TagInfo().withKey("fakeTokenPlaceholder").withValue("value"))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .postRules() + .createOrUpdate( + "lrs1", "1", new PostRulesResourceInner().withRuleName("postRule1"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesDeleteSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesDeleteSamples.java new file mode 100644 index 000000000000..e66d354bfbd7 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PostRules Delete. */ +public final class PostRulesDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().delete("lrs1", "1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().delete("lrs1", "1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesGetCountersSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesGetCountersSamples.java new file mode 100644 index 000000000000..432d81fe3a27 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesGetCountersSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PostRules GetCounters. */ +public final class PostRulesGetCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_getCounters_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_getCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesGetCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().getCountersWithResponse("lrs1", "1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_getCounters_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_getCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesGetCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().getCountersWithResponse("lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesGetSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesGetSamples.java new file mode 100644 index 000000000000..4402dc68905b --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesGetSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PostRules Get. */ +public final class PostRulesGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_Get_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().getWithResponse("lrs1", "1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_Get_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().getWithResponse("lrs1", "1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesListSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesListSamples.java new file mode 100644 index 000000000000..498538e24220 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PostRules List. */ +public final class PostRulesListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_List_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().list("lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_List_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().list("lrs1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesRefreshCountersSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesRefreshCountersSamples.java new file mode 100644 index 000000000000..3f474b5dd7ab --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesRefreshCountersSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PostRules RefreshCounters. */ +public final class PostRulesRefreshCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_refreshCounters_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_refreshCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesRefreshCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().refreshCountersWithResponse("lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_refreshCounters_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_refreshCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesRefreshCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().refreshCountersWithResponse("lrs1", "1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesResetCountersSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesResetCountersSamples.java new file mode 100644 index 000000000000..dc55de7bdf74 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PostRulesResetCountersSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PostRules ResetCounters. */ +public final class PostRulesResetCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_resetCounters_MaximumSet_Gen.json + */ + /** + * Sample code: PostRules_resetCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesResetCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().resetCountersWithResponse("lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_resetCounters_MinimumSet_Gen.json + */ + /** + * Sample code: PostRules_resetCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void postRulesResetCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.postRules().resetCountersWithResponse("lrs1", "1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesCreateOrUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..f41dd4aa5bf4 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesCreateOrUpdateSamples.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PreRulesResourceInner; +import com.azure.resourcemanager.paloaltonetworks.models.ActionEnum; +import com.azure.resourcemanager.paloaltonetworks.models.BooleanEnum; +import com.azure.resourcemanager.paloaltonetworks.models.Category; +import com.azure.resourcemanager.paloaltonetworks.models.DecryptionRuleTypeEnum; +import com.azure.resourcemanager.paloaltonetworks.models.DestinationAddr; +import com.azure.resourcemanager.paloaltonetworks.models.SourceAddr; +import com.azure.resourcemanager.paloaltonetworks.models.StateEnum; +import com.azure.resourcemanager.paloaltonetworks.models.TagInfo; +import java.util.Arrays; + +/** Samples for PreRules CreateOrUpdate. */ +public final class PreRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .preRules() + .createOrUpdate( + "lrs1", + "1", + new PreRulesResourceInner() + .withEtag("c18e6eef-ba3e-49ee-8a85-2b36c863a9d0") + .withRuleName("preRule1") + .withDescription("description of pre rule") + .withRuleState(StateEnum.DISABLED) + .withSource( + new SourceAddr() + .withCidrs(Arrays.asList("1.0.0.1/10")) + .withCountries(Arrays.asList("India")) + .withFeeds(Arrays.asList("feed")) + .withPrefixLists(Arrays.asList("PL1"))) + .withNegateSource(BooleanEnum.TRUE) + .withDestination( + new DestinationAddr() + .withCidrs(Arrays.asList("1.0.0.1/10")) + .withCountries(Arrays.asList("India")) + .withFeeds(Arrays.asList("feed")) + .withPrefixLists(Arrays.asList("PL1")) + .withFqdnLists(Arrays.asList("FQDN1"))) + .withNegateDestination(BooleanEnum.TRUE) + .withApplications(Arrays.asList("app1")) + .withCategory( + new Category() + .withUrlCustom(Arrays.asList("https://microsoft.com")) + .withFeeds(Arrays.asList("feed"))) + .withProtocol("HTTP") + .withProtocolPortList(Arrays.asList("80")) + .withInboundInspectionCertificate("cert1") + .withAuditComment("example comment") + .withActionType(ActionEnum.ALLOW) + .withEnableLogging(StateEnum.DISABLED) + .withDecryptionRuleType(DecryptionRuleTypeEnum.SSLOUTBOUND_INSPECTION) + .withTags(Arrays.asList(new TagInfo().withKey("fakeTokenPlaceholder").withValue("value"))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .preRules() + .createOrUpdate( + "lrs1", "1", new PreRulesResourceInner().withRuleName("preRule1"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesDeleteSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesDeleteSamples.java new file mode 100644 index 000000000000..155d23c254a7 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PreRules Delete. */ +public final class PreRulesDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().delete("lrs1", "1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().delete("lrs1", "1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesGetCountersSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesGetCountersSamples.java new file mode 100644 index 000000000000..9eb653995ec0 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesGetCountersSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PreRules GetCounters. */ +public final class PreRulesGetCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_getCounters_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_getCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesGetCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().getCountersWithResponse("lrs1", "1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_getCounters_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_getCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesGetCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().getCountersWithResponse("lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesGetSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesGetSamples.java new file mode 100644 index 000000000000..ea0d14cf27f1 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesGetSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PreRules Get. */ +public final class PreRulesGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_Get_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().getWithResponse("lrs1", "1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_Get_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().getWithResponse("lrs1", "1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesListSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesListSamples.java new file mode 100644 index 000000000000..46f39fe660cc --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PreRules List. */ +public final class PreRulesListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_List_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().list("lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_List_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().list("lrs1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesRefreshCountersSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesRefreshCountersSamples.java new file mode 100644 index 000000000000..48ddf15bd20f --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesRefreshCountersSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PreRules RefreshCounters. */ +public final class PreRulesRefreshCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_refreshCounters_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_refreshCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesRefreshCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().refreshCountersWithResponse("lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_refreshCounters_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_refreshCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesRefreshCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().refreshCountersWithResponse("lrs1", "1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesResetCountersSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesResetCountersSamples.java new file mode 100644 index 000000000000..7a1fdcf66b87 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PreRulesResetCountersSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PreRules ResetCounters. */ +public final class PreRulesResetCountersSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_resetCounters_MinimumSet_Gen.json + */ + /** + * Sample code: PreRules_resetCounters_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesResetCountersMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().resetCountersWithResponse("lrs1", "1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_resetCounters_MaximumSet_Gen.json + */ + /** + * Sample code: PreRules_resetCounters_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void preRulesResetCountersMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.preRules().resetCountersWithResponse("lrs1", "1", "firewall1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackCreateOrUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackCreateOrUpdateSamples.java new file mode 100644 index 000000000000..d71e8296c1cd --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackCreateOrUpdateSamples.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import com.azure.resourcemanager.paloaltonetworks.fluent.models.PrefixListGlobalRulestackResourceInner; +import java.util.Arrays; + +/** Samples for PrefixListGlobalRulestack CreateOrUpdate. */ +public final class PrefixListGlobalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListGlobalRulestacks() + .createOrUpdate( + "praval", + "armid1", + new PrefixListGlobalRulestackResourceInner() + .withDescription("string") + .withPrefixList(Arrays.asList("1.0.0.0/24")) + .withEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c27") + .withAuditComment("comment"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListGlobalRulestacks() + .createOrUpdate( + "praval", + "armid1", + new PrefixListGlobalRulestackResourceInner().withPrefixList(Arrays.asList("1.0.0.0/24")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackDeleteSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackDeleteSamples.java new file mode 100644 index 000000000000..6e0b8e4e6fae --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PrefixListGlobalRulestack Delete. */ +public final class PrefixListGlobalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListGlobalRulestacks().delete("praval", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListGlobalRulestacks().delete("praval", "armid1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackGetSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackGetSamples.java new file mode 100644 index 000000000000..f23a4080536e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackGetSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PrefixListGlobalRulestack Get. */ +public final class PrefixListGlobalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListGlobalRulestacks().getWithResponse("praval", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListGlobalRulestacks().getWithResponse("praval", "armid1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackListSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackListSamples.java new file mode 100644 index 000000000000..336b34fb5c3e --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListGlobalRulestackListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PrefixListGlobalRulestack List. */ +public final class PrefixListGlobalRulestackListSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_List_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_List_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackListMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListGlobalRulestacks().list("praval", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_List_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListGlobalRulestack_List_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListGlobalRulestackListMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListGlobalRulestacks().list("praval", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackCreateOrUpdateSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackCreateOrUpdateSamples.java new file mode 100644 index 000000000000..555a873fbee8 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackCreateOrUpdateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +import java.util.Arrays; + +/** Samples for PrefixListLocalRulestack CreateOrUpdate. */ +public final class PrefixListLocalRulestackCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_CreateOrUpdate_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackCreateOrUpdateMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListLocalRulestacks() + .define("armid1") + .withExistingLocalRulestack("rgopenapi", "lrs1") + .withPrefixList(Arrays.asList("1.0.0.0/24")) + .create(); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_CreateOrUpdate_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackCreateOrUpdateMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListLocalRulestacks() + .define("armid1") + .withExistingLocalRulestack("rgopenapi", "lrs1") + .withPrefixList(Arrays.asList("1.0.0.0/24")) + .withDescription("string") + .withEtag("2bf4a339-294d-4c25-b0b2-ef649e9f5c27") + .withAuditComment("comment") + .create(); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackDeleteSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackDeleteSamples.java new file mode 100644 index 000000000000..a8c1d07def81 --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PrefixListLocalRulestack Delete. */ +public final class PrefixListLocalRulestackDeleteSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_Delete_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackDeleteMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListLocalRulestacks().delete("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_Delete_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackDeleteMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager.prefixListLocalRulestacks().delete("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackGetSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackGetSamples.java new file mode 100644 index 000000000000..5bfbe27a8d7c --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackGetSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PrefixListLocalRulestack Get. */ +public final class PrefixListLocalRulestackGetSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_Get_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_Get_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackGetMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListLocalRulestacks() + .getWithResponse("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_Get_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_Get_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackGetMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListLocalRulestacks() + .getWithResponse("rgopenapi", "lrs1", "armid1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackListByLocalRulestacksSamples.java b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackListByLocalRulestacksSamples.java new file mode 100644 index 000000000000..c7aa98124a9a --- /dev/null +++ b/sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/src/samples/java/com/azure/resourcemanager/paloaltonetworks/generated/PrefixListLocalRulestackListByLocalRulestacksSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.paloaltonetworks.generated; + +/** Samples for PrefixListLocalRulestack ListByLocalRulestacks. */ +public final class PrefixListLocalRulestackListByLocalRulestacksSamples { + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackListByLocalRulestacksMaximumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListLocalRulestacks() + .listByLocalRulestacks("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen.json + */ + /** + * Sample code: PrefixListLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen. + * + * @param manager Entry point to PaloAltoNetworksNgfwManager. + */ + public static void prefixListLocalRulestackListByLocalRulestacksMinimumSetGen( + com.azure.resourcemanager.paloaltonetworks.PaloAltoNetworksNgfwManager manager) { + manager + .prefixListLocalRulestacks() + .listByLocalRulestacks("rgopenapi", "lrs1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/paloaltonetworks/ci.yml b/sdk/paloaltonetworks/ci.yml new file mode 100644 index 000000000000..17226d4bb243 --- /dev/null +++ b/sdk/paloaltonetworks/ci.yml @@ -0,0 +1,47 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/paloaltonetworks/ci.yml + - sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/ + exclude: + - sdk/paloaltonetworks/pom.xml + - sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/paloaltonetworks/ci.yml + - sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/ + exclude: + - sdk/paloaltonetworks/pom.xml + - sdk/paloaltonetworks/azure-resourcemanager-paloaltonetworks/pom.xml + +parameters: + - name: release_azureresourcemanagerpaloaltonetworks + displayName: azure-resourcemanager-paloaltonetworks + type: boolean + default: false + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: paloaltonetworks + EnableBatchRelease: true + Artifacts: + - name: azure-resourcemanager-paloaltonetworks + groupId: com.azure.resourcemanager + safeName: azureresourcemanagerpaloaltonetworks + releaseInBatch: ${{ parameters.release_azureresourcemanagerpaloaltonetworks }} diff --git a/sdk/paloaltonetworks/pom.xml b/sdk/paloaltonetworks/pom.xml new file mode 100644 index 000000000000..d290a3dd6113 --- /dev/null +++ b/sdk/paloaltonetworks/pom.xml @@ -0,0 +1,15 @@ + + + 4.0.0 + com.azure + azure-paloaltonetworks-service + pom + 1.0.0 + + + azure-resourcemanager-paloaltonetworks + +